#include <stdio.h>
#include <string.h>
int main ()
{
char c;
char string[100];
FILE *fp;
fp=fopen("mytext.txt","r++");
fgets(string,sizeof(string),fp);
//printf("%s\n",string);
do {
c = fgetc(fp);
if (c == 'a') {printf("we have an A");}
}while(c != EOF);
system("PAUSE");
return 0;
}
what's wrong ?


Sign In
Create Account

Back to top









