I'm running this C program (from the C programming by K&R);
#include <stdio.h>
main(){
double nc;
for(nc = 0; getchar() != EOF; ++nc);
printf("%.0f\n", nc);
}
It reads in characters from stdin and increments a counter, nc.
When I compile and run it in git bash, nc never gets printed after the program terminates.
CTRL+Z, and CTRL+C just stop the program.
How do I send EOF in windows git bash terminal?