Guys please check the following code.
It prints a file backwards, but has very weird behavior.
Whenever we reach to the beginning of the file,
We go back to the end and print the file over and over again! I don't understand how this could be, fseek() not allow to go back from the beginning.
I'm posting this code even that I've fixed the problem.
I still want to understand how can it be.
If ftell is enabled the output will be something like this:
puts("File not found!");
puts("Error skipping file");
while ((fread(&cReadByte,sizeof(char),1,fpRead)) && (ftell(fpRead)>0))