I saw this answer on another forum and i think that this answer will solve your problem.
ANSWER:
/*something like this. refer to the C manual*/
int getpass() {
char c;
char i=0;
char passwd[10]
/*note that the password will be entered either when the person presses space or when they type in 10 chars*/
while (((c=getch())!=0x20)&&(i<10)) {
putch('*');
passwd[i]=c;
i++;
}
return passwd
}
to see help about putch()
go to (http://www.rfoinc.com/docs/qnx/watcom/clibref/src/putch.html)