Newsgroups: comp.lang.c Path: utzoo!henry From: henry@zoo.toronto.edu (Henry Spencer) Subject: Re: Simple question. Message-ID: <1991May1.170311.18988@zoo.toronto.edu> Date: Wed, 1 May 1991 17:03:11 GMT References: <6131@gara.une.oz.au> <24528@well.sf.ca.us> Organization: U of Toronto Zoology In article <24528@well.sf.ca.us> ron@well.sf.ca.us (Ronald Hayden) 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. > >scanf() will always echo the characters, but getchar() won't... Wrong; on any sane system, scanf() and getchar() use precisely the same machinery for getting characters, and both normally echo them. Note: "on any sane system". The fact is, this is an operating-system question, not a C question. C provides no standard way to do it. This question should be asked in some operating-system-specific group, like comp.os.msdos.programmer. Looking at comp.lang.c's Frequently Asked Questions list might also be fruitful, since this is an FAQ. -- And the bean-counter replied, | Henry Spencer @ U of Toronto Zoology "beans are more important". | henry@zoo.toronto.edu utzoo!henry