Halo all,
I'm posting here after a long time. During this time I was just sharpening my pointer skills but as pointers are the most "easiest" part of C I got stuck at this one.
Why does gets(although it's not advisable) not work with the second one but with the first.
Code 1:
Code 2:Code:char s[5]; gets(s);
As I see it s points to first element in both the cases, and both of them not initialized at all. So s doesn't points to a particular address initially.Code:char *s; gets(s);
Thanks