read data from file until end of file is reached code example Example: how to check if you are at the end of an file while(!feof(stdin))