where are these errors
Code:#include<stdio.h> int comparason_function(int x1, int x2) { if(x1==x2) return 0; else if(x1!=x2) return -1; return 0; } int main() { FILE* file; char* filename; int ii; int jj; int array1[25]; int array2[25]; filename = "data2.txt"; file = fopen (filename, "r"); printf("THIS PROGRAM IS DONE BY REZA MOLOUDI. ALL RIGHTS ARE RESEVED\n"); for (jj=0; jj<25 ; jj++) { fscanf (file, "%d", &array1[jj]); //a[j] = i; } for (jj=0; jj<25 ; jj++) { fscanf (file, "%d", &array2[jj]); } for(ii=0 ; ii<25 ; ii++) { if (comparason_function(array1[ii],array2[ii])==0) printf("A %d is found in Cell #%d \n", array1[ii], ii); } return 0; }



LinkBack URL
About LinkBacks



