Simple question.

Ronald Hayden ron at well.sf.ca.us
Wed May 1 15:18:23 AEST 1991


cfiddyme at gara.une.oz.au (Kith Kanan) writes:

> Could someone please tell me if it is possible to read a string with
> scanf() and not have the string printed on the screen.
>                          Thanks.
>                                 Chris.

scanf() will always echo the characters, but getchar() won't.  If
you're receiving more than one character, though, you'll have to call
getchar() multiple times, as it only processes a character at a time.



More information about the Comp.lang.c mailing list