table is an array of 3 which stores three rows of each file
it returns the dmallest id

why they use
Code:
*index=i;
for what purpose
??
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;			
}