I am new to C programming. I want to read the whole data from a text file.
Can anybody tell me the code/syntax for following steps in sequence:
1) Open a text file.
1) Read the data from a text file.
3) If successfully read, then check the size of the data read (means number of characters read from the file). If zero or above range (e.g. 100000 chars) then prompt a message and exists.
4) If found some size within range, then close the text file and proceed.
Does fopen, fread help me in this case ? plz advice...
I'll appreciate if anybody can provide me the code
Thanks in advance...