Is it that there is no bounds checking in C while there is in C++ ?

On Thu, Aug 18, 2011 at 9:27 AM, Dipankar Patro <dip10c...@gmail.com> wrote:

> Thats new..
> Its not working in C++, where as in C it works like a charm.
>
>   On 18 August 2011 08:57, vartika aggarwal 
> <vartika.aggarwa...@gmail.com>wrote:
>
>>  @Aditi: That's because you haven't changed the language to 'C' (while
>> working on ideone. It doesn't give an error in C)
>>
>>
>> On Thu, Aug 18, 2011 at 8:47 AM, aditi garg <aditi.garg.6...@gmail.com>wrote:
>>
>>> @payal: im getting compile time errors fr both the strings...
>>> Chk dis :http://ideone.com/BRbkf
>>>
>>>
>>> On Thu, Aug 18, 2011 at 4:12 AM, payal gupta <gpt.pa...@gmail.com>wrote:
>>>
>>>> i modified the code a lil bit
>>>> #include<stdio.h>
>>>> #include<conio.h>
>>>> int main()
>>>> { clrscr();
>>>>  char arr[5] = "geeks";
>>>>  printf("%s\n", arr);
>>>>  char b[1]="t";
>>>>  printf("%s\n",b);
>>>>  getchar();
>>>>  return 0;
>>>> }
>>>>
>>>> the output in dis case is somewhat diff..cud someone explain...
>>>>
>>>> On Thu, Aug 18, 2011 at 3:28 AM, Ayush Kapoor 
>>>> <ayush21011...@gmail.com>wrote:
>>>>
>>>>> There is no null character in this string,as its length is 5 and the
>>>>> number of characters is 5(Geeks),and printf("%s",arr) should output the
>>>>> string till the null character
>>>>>
>>>>>
>>>>> On Thu, Aug 18, 2011 at 2:40 AM, bihari <kumarvive...@gmail.com>wrote:
>>>>>
>>>>>> upto null charchter..............
>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "Algorithm Geeks" group.
>>>>>> To post to this group, send email to algogeeks@googlegroups.com.
>>>>>> To unsubscribe from this group, send email to
>>>>>> algogeeks+unsubscr...@googlegroups.com.
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Ayush
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Algorithm Geeks" group.
>>>>> To post to this group, send email to algogeeks@googlegroups.com.
>>>>> To unsubscribe from this group, send email to
>>>>> algogeeks+unsubscr...@googlegroups.com.
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>>
>>>>
>>>> --
>>>>  You received this message because you are subscribed to the Google
>>>> Groups "Algorithm Geeks" group.
>>>> To post to this group, send email to algogeeks@googlegroups.com.
>>>> To unsubscribe from this group, send email to
>>>> algogeeks+unsubscr...@googlegroups.com.
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/algogeeks?hl=en.
>>>>
>>>
>>>
>>>
>>> --
>>> Aditi Garg
>>> Undergraduate Student
>>> Electronics & Communication Divison
>>> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
>>> Sector 3, Dwarka
>>> New Delhi
>>>
>>>
>>> --
>>>  You received this message because you are subscribed to the Google
>>> Groups "Algorithm Geeks" group.
>>> To post to this group, send email to algogeeks@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> algogeeks+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/algogeeks?hl=en.
>>>
>>
>>
>>
>> --
>> Regards
>>
>> Vartika Aggarwal
>> Undergraduate Student
>> IT Department
>> NSIT, Dwarka
>>
>> --
>>   You received this message because you are subscribed to the Google
>> Groups "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>
>
> --
>
> ___________________________________________________________________________________________________________
>
> Please do not print this e-mail until urgent requirement. Go Green!!
> Save Papers <=> Save Trees
>
> --
>  You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards

Vartika Aggarwal
Undergraduate Student
IT Department
NSIT, Dwarka

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to