怎么判断当前读的数据是文件中最后一个

如何判断当前读的数据是文件中最后一个
date.txt文件有约100个int 型数据。现在想把它一个一个读出来,但是怎么知道什么时候读到的数据是最后一个。

------解决方案--------------------
用feof函数进行判断。
------解决方案--------------------
char *fgets(char *s, int n, FILE *stream)
fgets reads at most the next n-1 characters into the array s, stopping if a newline is encountered; the newline is included in the array, which is terminated by '\0'. fgets returns s, or NULL if end of file or error occurs.
------解决方案--------------------
文件的末尾有一个标志 读取到的数值为 EOF 表示到文件末尾
------解决方案--------------------
!= EOF