-------------------------------------------------- #include /* count2.c - count characters in input, version 2 */ main() { double nc; for (nc = 0; getchar() != EOF; ++nc) ; printf("%.0f\n", nc); } ------------------------------------------------- 1. double is 64-bit double precision floating point. 2. for loop is empty, but terminating ";" still needed. 3. "%f" format descriptor for 32-bit float and 64-bit double. 4. "%.0f" supresses printing of decimal point and fraction part. 5. both count1.c and count2.c work with zero length files. ---------------------------------------------------