Why does this code result in infinite loop on cLion, while on opening the project on Xcode it works normally and terminates on finding on EOF?
while (!feof(file)) {
fscanf(file, "%d", &number);
printf("%d\t",number);
}
Why does this code result in infinite loop on cLion, while on opening the project on Xcode it works normally and terminates on finding on EOF?
while (!feof(file)) {
fscanf(file, "%d", &number);
printf("%d\t",number);
}