@dharmendra....does every uninitialized memory has NULL or there can be some garbage value also...plz comment....???
On Mon, Oct 8, 2012 at 9:02 PM, rahul sharma <rahul23111...@gmail.com>wrote: > If its NULL then y does it give segmentation fault as for NULL it should > print an empty string....plz xomment > > > On Sun, Oct 7, 2012 at 6:56 PM, DHARMENDRA KUMAR VERMA < > dharmendrakumarverm...@gmail.com> wrote: > >> Bcoz u r trying to access an argument which doesnt even exist........... >> for exmple ./a.out --> argc=1 >> (argv[0]="./a.out",argv[1]=NULL(not exist)) >> ./a.out 1st_arg --> argc=2 >> (argv[0]="./a.out",argv[1]="1st_arg",argv[2]=NULL(not exist)); >> resulting '0' as %d specifier is used the print NULL string . >> instead if u use %s it'll give u sementation fault... >> >> -- >> 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.