#include#define MAXLINE 10int getline(char line[],int maxline);void copy(char to[],char from[]);int main(){ int len; int max; char line[MAXLINE] = {0}; char longest[MAXLINE] = {0}; max = 0; while((len = getline(line,MAXLINE)) > 0) if(len > max) { max = len; copy(longest,line); } if(max > 0) printf("%d %s\n",max,longest); return 0;}int getline(char s[],int lim){ int c,i; for(i = 0; (c=getchar()) != EOF && c != '\n';i++) { if(i < lim-2) s[i] = c; } if(c == '\n') { if(i >= lim-2) { s[lim-2] = '\n'; s[lim-1] = '\0'; } } return i;}void copy(char to[],char from[]){ int i = 0; while((to[i] = from[i]) != '\0') i++;}比较蛋疼!统计总的字符数,打印能打印的最多字符。