Reads a password
Declaration:
char *getpass(const char *prompt);
Remarks:
getpass reads a password from the system console, after prompting with the
null-terminated string prompt and disabling the echo.
It returns a pointer to a null-terminated string of up to eight characters
(not counting the null terminator).
Return Value:
Returns a pointer to a static string that is overwritten with each call.
Example:
#include <conio.h>
int main(void)
{
char *password;
password = getpass("Input a password:");
cprintf("The password is: %s\r\n", password);
return 0;
}
0 comments:
Post a Comment