este seria el codigo final
Código PHP:
int main(void){
char c=' ';
FILE * pf;
FILE * pd;
pf=fopen("html.txt","r");
pd=fopen("html2.txt","w");
if(pd!=NULL && pf !=NULL){
while(c!=EOF){
if(c=='á')fprintf(pd,"ã");
else if(c=='é')fprintf(pd,"&etilde;");
else if(c=='í')fprintf(pd,"ĩ");
else if(c=='ó')fprintf(pd,"õ");
else if(c=='ú')fprintf(pd,"ũ");
else if(c=='ñ')fprintf(pd,"ñ");
else fputc(c,pd);
c=fgetc(pf);
}
fclose (pf);
fclose (pd);
}else{
puts("Error en archivo");
}
return 0;
}