Interesting thing I came across: http://stackoverflow.com/questions/1239938/c-accesses-an-array-out-of-bounds-gives-no-error-why
On 18 August 2011 09:39, vartika aggarwal <[email protected]>wrote: > 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 <[email protected]>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 <[email protected] >> > 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 >>> <[email protected]>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 <[email protected]>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 <[email protected] >>>>> > 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 <[email protected]>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 [email protected]. >>>>>>> To unsubscribe from this group, send email to >>>>>>> [email protected]. >>>>>>> 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 [email protected]. >>>>>> To unsubscribe from this group, send email to >>>>>> [email protected]. >>>>>> 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 [email protected]. >>>>> To unsubscribe from this group, send email to >>>>> [email protected]. >>>>> 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 [email protected]. >>>> To unsubscribe from this group, send email to >>>> [email protected]. >>>> 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 [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> 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 [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]. > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
