[algogeeks] Re: Output?? Why??

2011-08-17 Thread bihari
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

Re: [algogeeks] Re: Output?? Why??

2011-08-17 Thread Ayush Kapoor
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

Re: [algogeeks] Re: Output?? Why??

2011-08-17 Thread payal gupta
i modified the code a lil bit #includestdio.h #includeconio.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

Re: [algogeeks] Re: Output?? Why??

2011-08-17 Thread aditi garg
@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 #includestdio.h #includeconio.h int main() { clrscr(); char arr[5] = geeks; printf(%s\n,

Re: [algogeeks] Re: Output?? Why??

2011-08-17 Thread vartika aggarwal
@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.comwrote: @payal: im getting compile time errors fr both the strings... Chk dis :http://ideone.com/BRbkf

Re: [algogeeks] Re: Output?? Why??

2011-08-17 Thread Dipankar Patro
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.comwrote: @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

Re: [algogeeks] Re: Output?? Why??

2011-08-17 Thread vartika aggarwal
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

Re: [algogeeks] Re: Output?? Why??

2011-08-17 Thread Dipankar Patro
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 vartika.aggarwa...@gmail.comwrote: Is it that there is no bounds checking in C while there is in C++ ? On Thu, Aug 18,