#include <stdio.h> main() { long nc = 0; while(getchar()!=EOF) { ++nc; } printf("字符总数为:%ld",nc); } 运行结果1: 运行结果2: