table is an array of 3 which stores three rows of each file
it returns the dmallest id
why they use
for what purposeCode:*index=i;
??
Code:int getMin(int eof[],vote table[],int *index){
int i,idmin;
for(i=0,idmin=999999999;i<3;i++)
if(eof[i]!=EOF && table[i].id<idmin){
idmin=table[i].id;
*index=i;
}
return idmin;
}