+ 2
How to read nested structure data from text file in C programming language?
i have created txt file using nested structure. Now i want to read that data.so how to use fread() function to read that nested structure ..plz plz help.....Thanks in advance
2 ответов
+ 5
Good, so you wanna read a txt file, in order to do so you follow these steps :
1 - Open the text file using the fopen() function
2 - use the function fgets() to read text from the stream and store it as a string. The newline or EOF character makes the fgets() function stop reading so you can check the newline or EOF file character to read the whole line.
3 - close the text file using the fclose() function.
Clear?
+ 1
https://code.sololearn.com/cqVgjCtm97WZ/?ref=app
here is problem.. . when i write new record it can read but when i add record and read that data ..there is problem .it will display unwanted