
- Forum
- Programming Talk
- C and C++
- What commands are available
What commands are available
This is a discussion on What commands are available within the C and C++ forums, part of the Programming Talk category; What are the commands that are available to read text files in C programming language? If someone could give me ...
-
03-01-2007, 11:14 AM #1
- Join Date
- Apr 2006
- Answers
- 124
What commands are available
What are the commands that are available to read text files in C programming language? If someone could give me the usage of these commands also I could get a detailed idea on the same.
-
Have a file pointer and open the file using fopen in read mode denoted by r+. Check and exit if file pointer is equal to NULL since it means file not found. If file pointer not equal to NULL then read the file using fgets function.
Try the above logic and let me know if you get struck. I will help you out.

Reply With Quote





