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 [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.