I was wondering what's happening in this code from K&R C:
#include <stdio.h>
int main() {
    double nc;
    for (nc = 0; getchar(); ++nc) {
        ;
    }
    printf("%.0f\n", nc);
}
When I run the code (OS X El Capitan), the for loop doesn't finish and I can't get to the printf statement.
 
     
     
     
     
     
    