#include<stdio.h>
#include<string.h>
int main(int argc,char*argv[])
{
char ch,ch2;
FILE *fp,*op;
fp=fopen("test1.txt","r");
if(!fp)
{
printf("\n can not file open a\n");
getche();
exit(0);
}
op=fopen("test2.txt","r");
if(!op)
{
printf("\n can not file open b\n");
getche();
exit(0);
}
do
{
ch=getc(fp);
ch2=getc(op);
if(ch!=ch2)
{
printf("\nnot rrrrrrrrrrrr similar\n");
getche();
}
}while(!feof(fp)&&!feof(op));
printf("are similar\n");
fclose(fp);
fclose(op);
}