Groovy hepcat Lauri Nurmi jived with Anthony Tibbs on 02 Feb 98 15:32:16!
C++ Saveding stuff's a cool scene. Dig it!
> use:
> char s[40];
LN> And that 40 should be 41, shouldn't it?
No.
> fgets (s, 40, stdin);
> printf ("\n\nThis was the string you entered: %s\n", s);
fgets() will read up to n-1 characters (where n is the second
argument, in this case 40), so it will read no more than 39
characters, then terminate with '\0'.
Wolvaen
... "There's nothing on TV. D'you want to have an argument?"
--- Blue Wave/RA v2.20
---------------
* Origin: The Gate, Melbourne Australia, +61-3-9809-5097 33.6k (3:633/159)
|