
c语言
文章平均质量分 79
stars2009
这个作者很懒,什么都没留下…
展开
-
K&R The C Programming Language(SecondEdition)中getchar()与EOF
其实,getchar()最典型的程序也就几行代码而已。本人所用的环境是DebianGNU/Linux,在其他系统下也一样。一、getchar的两点总结:1.getchar是以行为单位进行存取的。当用getchar进行输入时,如果输入的第一个字符为有效字符(即输入是文件结束符EOF,Windows下为组合键Ctrl+Z, Unix/Linux下为组合键Ctrl+D),那么只有当最后一个输入字符为换行转载 2009-01-19 16:39:00 · 515 阅读 · 0 评论 -
getchar与getch
getcharThis is a standard function that gets a character from the stdin.getchThis is a nonstandard function that gets a character from keyboard, does not echo to screen.getcheThis is a nonstandard fun原创 2009-01-19 17:25:00 · 515 阅读 · 0 评论 -
一份对小程序的理解
#include#define MAXLINE 1000int getline(char line[], int maxline);void copy(char to[], char from[]);main(){ int len; int max; char line[MAXLINE]; char longest[MAXLINE]; max = 0; while((len = get原创 2009-02-03 09:49:00 · 490 阅读 · 0 评论