2011年4月20日
摘要: 源自《The C Programming Language》P20 ex1.9: 从终端读入一组文本行,并将最长的文本行打印出来 代码: main.c 1 #include <stdio.h> 2 3 #define MAXLINE 1000 //允许输入行的最大长度 4 #define LIM 8 5 6 int getline(char line[], int maxline); 7 void copy(char to[], char from[]); 8 9 int main()10 {11 12 int i, j;13 int len; //当前行长度14 int maxn 阅读全文
posted @ 2011-04-20 05:17 将军之盾 阅读(442) 评论(0) 推荐(0) 编辑