I have a bunch of files of variable length from which I would like to read data values. Since I don't know how long any specific file is going to be I figured I should use a while loop to read from the files until EOF is reached. I tried this, which did not work so is obviously wrong.

Code:
		while(tmp != 'EOF'){
			
			tmp = fscanf(fileptr,"%d", &tmp2);
			
			arry[tmp2]++;
		}
Anyone know where I am going wrong? Help would be greatly appreciated.