character = getc( file ); while( character != EOF ){ if( character=='a' ){//if character is found count ++;//increment count } character = fgetc( file ); code example
Example: what is the function prototype for fputc()
int fputc(const char ch, FILE *filename);