Help...

Dave 'Yes, I'm weird' Newton dnewton at carroll1.UUCP
Tue Oct 10 09:26:06 AEST 1989


Why doesn't this work?

==========================
#include <stdio.h>
main ()
{
   char      h[];
   scanf ("%s", h);
   printf ("%s\n", h);
}
==========================

  It seems innocent enuf, but just prints garbage.  I'm missing something
obvious, but I'll be darned if I know what it is.

-- 
David L. Newton       |      dnewton at carroll1.UUCP     | Quote courtesy of
(414) 524-7343 (work) |     dnewton at carroll1.cc.edu    | Marie Niechwiadowicz,
(414) 524-6809 (home) | 100 NE Ave, Waukesha, WI 53186 | Boston College.
[Q]: How many surrealists does it take to screw in a light bulb? [A]: The fish. 



More information about the Comp.lang.c mailing list