Simple question.

Roy Johnson rjohnson at shell.com
Thu May 2 03:09:55 AEST 1991


In article <24528 at well.sf.ca.us> ron at well.sf.ca.us (Ronald Hayden) writes:
   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.

This is really OS specific.  Scanf does NOT echo characters, the
OS does.  See your appropriate OS manuals or newsgroup for details.
The answer to the original question is "Yes, it is probably possible."
--
=============== !You!can't!get!here!from!there!rjohnson ===============
Feel free to correct me, but don't preface your correction with "BZZT!"
Roy Johnson, Shell Development Company



More information about the Comp.lang.c mailing list