if (fclose(file1) != 0)
{
printf("Cannot close file\n");
}
I learned that the return value for fclose() should always be checked. I read somewhere that if the file did not close properly, data could be lost. However, i am unsure how a situation like this could occur, or any other situations that are related. What could be done if such a situation happened?