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 <
[email protected]> 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 [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.

Reply via email to