#include #include #include #define MAX_RIGHE 100 #define MAX_CHAR 100 void eliminarighevuote(char testo[MAX_RIGHE][MAX_CHAR], int *righe); void righeuguali(char testo1[MAX_RIGHE][MAX_CHAR], char testo2[MAX_RIGHE][MAX_CHAR], int righe1, int righe2); void contaparole(char riga1[], char riga2[]); int main (){ int righe1, righe2; char testo1[MAX_RIGHE][MAX_CHAR]; char testo2[MAX_RIGHE][MAX_CHAR]; int i; FILE *pf1; FILE *pf2; pf1 = fopen("testo1.txt", "r"); pf2 = fopen("testo2.txt", "r"); righe1 = 0; while (fgets(testo1[righe1],100,pf1) != NULL) { righe1++; } righe2 = 0; while (fgets(testo2[righe2],100,pf2) != NULL) { righe2++; } fclose(pf1); fclose(pf2); eliminarighevuote(testo1, &righe1); eliminarighevuote(testo2, &righe2); righeuguali(testo1, testo2, righe1, righe2); for(i=0;i