I need to write a function in C that reads a small text file , stores every character in a variable, and then stops reading when it reaches EOF. I assume I need to use fread();
I need precise info on my problem, I have been searching around only finding which parameters go into fread(); but no luck on how to loop until end of file.
Any help will be greatly appreciated.