I just baught this book called "The C programming language" and there is an example in the book for counting character input but for some reason it doesn't print out the number on the screen, can someone tell me what i am doing wrong.
I am using a redhat 9 box.
Code:#include <stdio.h> main() { double nc; for (nc = 0; getchar() != EOF; ++nc) ; printf("%.0f\n", nc); }