Hi friends,
Can anyone please tell me how can I set echoing the characters off while I type them on the keyboard ? e.g; I have to input password in c code but that must not be displayed while typing. I am working in Linux.

are u working on a command line app??

try this

while(1) {
    if (((str[i] = getch()) == '\n') {
           break ;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.