#回显是什么意思

回显输入就是,用户输入的字符直接显示在电脑屏幕上。

无回显输入就是,敲键盘后屏幕不显示你所敲的字符。

一些编译器支持无缓冲输入的函数在conio.h头文件中如:回显无缓冲输入getche()和无回显无缓冲输入getch()(这个可以帮你稍微了解回显)

#include

#include

int main(void)

{

char ch;

ch = getch();

printf("%c",ch);

return 0;

}

输出结果(我输入一个f,以下我都输入一个f)

fPress any key to continue

另一个程序

#include

#include

int main(void)

{

char ch;

ch = getch();

// printf("%c",ch);

return 0;

}

和上面对比一下结果

Press any key to continue

接下来是回显的

#include

#include

int main(void)

{

char ch;

ch = getche();

// printf("%c",ch);

return 0;

}

结果

fPress any key to continue

另一个程序和上面对比一下

#include

#include

int main(void)

{

char ch;

ch = getche();

printf("%c",ch);

return 0;

}

结果

ffPress any key to continue

OK