Enter Password in C
Posted
by Mohit Deshpande
on Stack Overflow
See other posts from Stack Overflow
or by Mohit Deshpande
Published on 2010-04-14T00:53:39Z
Indexed on
2010/04/14
1:03 UTC
Read the original article
Hit count: 365
I am aware that it is not possible to echo the * while you type in standard ANSI C. But is there a way to display nothing while someone is typing their password in the console. What I mean is like the sudo prompts in a Unix/Linux terminal. Like if you type in the command: sudo cp /etc/somefile ~/somedir
. You are usually prompted for the root password. And while you type it in, the terminal displays nothing. Is this effect possible in C? If it is, how?
© Stack Overflow or respective owner