I want to mask my password while writing it with *. I use Linux GCC for this code. I know one solution is to use getch() function like this
*
getch()
Unfortunately in the C standard library there is no such function out of the box. Maybe in third party library.
One option is use ANSI escape sequences to set the background color to foreground color in the console to conceal the password. Try this link.