2025-03-24 19:46:42 +08:00

19 lines
216 B
C

#include <stdio.h>
int main(){
FILE *fp;
char ch;
int count=0;
fp = fopen("letter.txt", "r");
while((ch=fgetc(fp)) != EOF){
if(ch == 'c'){
count++;
}
}
printf("c个数为:%d\n", count);
return 0;
}