Quote Originally Posted by esbo View Post
...in the first case *p is declared globally...
Quote Originally Posted by carrotcake1029 View Post
You need to allocate room in *p.
Whaddareya talkin' about? There is no *p declared anywhere, just p
(Actually, that's true to some degree.)

Quote Originally Posted by esbo View Post
It's designed to crash if the string is too long
No no, esbo that is not true. It's designed to create a security flaw and undefined behavior if it's too long. Perhaps even format the entire hard drive.
Scanf woes