Input a password and replace with *s
Hi. I was wondering if there was a way to replace characters input by fgets() with * since a password is being input. I can't think of any way to do it while inputting the password. I don't think fgets() can do it but again I can't think of any other function that can.
getchar() would not work for me, since I don't know how many characters will be input (even though there is a maximum ofcourse).
I know I can print '\r' after I input it and output something like "Password succesfully input" but I hoped there would be a way to do it while inputting the password.
Thank you.