I am taking Comp 1200 (introduction to C programming for engineers) my freshman year here at AU. I have the old book called "The C Programming Language" by Kernighan and Ritchie. I have come across a code example that doesn't seem to work right. Here it is:
/*count the characters in input*/
for (nc = 0; getchar() != EOF; ++nc)
I thought that this program was supposed to tell me how many characters I input, but it doesn't seem to do anything. Am I missing something here?