C examples for File:File Read
Counts the number of characters in its input up to the end of file.
#include <stdio.h> int main(void) { int count = 0;//from w ww .j a v a 2s . co m while (getchar() != EOF) { count++; } printf("Character count: %d\n", count); return 0; }