📄 stdin.c
字号:
#include <stdio.h>int main (){ int ch; /* declared as int because EOF is -1 We don't know if char is defined as being signed or not in this compiler. If it is unsigned, will not pick up EOF */ while ((ch = getchar()) != EOF) printf("read %c \n", ch); /* getchar() reads from stdin, the keyboard. stdin is buffered so characters not processed until Enter is pressed. Then they, and Enter, are processed all together */ printf("EOF \n"); /* in DOS, ctrl-z is EOF. Can type this from the keyboard */ return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -