In this video we are going to discuss about how we can detect and handle errors during read and write operations in C.
Summary :
1. We can use ferror() library function to check if any error occurred during read/write operation.
ferror(filePtr) returns
0 - for success
non zero - for failure
2. We can print error messages using perror() function. This will print error message specified by compiler
perror("our message");
Result :
out message: System error message
3. We can use feof(filePtr) function to check end of file
feof(filePtr) returns
0 : if end of file not reached
1 : if end of file reached
Audio language : Hindi
In this course , we are going to cover all C concepts in simple and easy to understand terms.
This course started from basics and now we are covering advance topics that are important from interview point of view.
Github : https://github.com/TechCourses4u/C-La...
Programs :
https://github.com/TechCourses4u/C-La...
sample.txt file :
https://github.com/TechCourses4u/C-La...