#include<stdio.h>
#include<conio.h>
int main()
{
char ch,psw[20];
char *p = psw;
while ((ch = getch()) != '\r')
{
*(p++) = ch;
putchar('*');
}
*p = '\0';
printf("\nThe password is : %s\n",psw);
return 0;
}
模拟输入密码时显示‘*’,然后将密码输出
最新推荐文章于 2021-03-02 01:40:19 发布