Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!uunet!zaphod.mps.ohio-state.edu!rpi!ghost.unimi.it!matteo From: matteo@ghost.unimi.it (Matteo Gelosa) Newsgroups: comp.lang.c Subject: Re: Simple question. Message-ID: <1991Apr29.133217.11357@ghost.unimi.it> Date: 29 Apr 91 13:32:17 GMT References: <6131@gara.une.oz.au> Organization: Computer Science Dep. - Milan University Lines: 28 cfiddyme@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. First: What do you mean with "not have the string printed on the screen"...??? scanf() doesn't print anything aywhere at all. It simply scan standard input or a file opened with fopen() looking for the first object that match the format argument according to format rules. So if you do something like char buffer[64]; scanf("%s", buffer); it will read from standard input the first character sequence between any kind of blanks (' ', '\t', '\n'...) without printing anything at all!!. Probably you mean how you can inserting characters from keyboard without echoing them on terminal. Lookup ioctl(2) and termio manuals you can get a lot of information about tty-s setting up. Matteo Gelosa. matteo@ghost.unimi.it