
Files
1. What is the difference between end of a file and end of a string?
Ans: The feof() function indicates the end of any file that may be binary or text file. It is used as
indication to stop reading the characters from a character array and its ASCII value is 0. Whereas the
end of a string is used to terminate the string and it is indicated by NULL character and can be written as
'\0'. It is used as indication to stop reading the characters from file and its ASCII value is 0.
2. Distinguish between text mode and binary mode operations of a file.
Ans: Streams are categorized in to two types. They are text and binary.
Text file contains