/* Example: Counting Characters Source: K&R2, p.18 */ #include main () { long nc; nc = 0; while(getchar() != EOF) ++nc; printf("%ld\n", nc); }