name the streams generally used for file i/o
Answers
Answered by
0
The stream we use for i/o is iosteam.
i.e input-output stream
Eg:header file
#include<iostream.h>
i.e input-output stream
Eg:header file
#include<iostream.h>
Answered by
3
Answer:
the streams generally used for I/O are :
(1) ifstream
(2)ofstream
(3)fstream
Explanation:
(1) ifstream is derived from istream class and it is used to associate a file with an input buffer so that the file can be read from.
(2) ofstream is derived from ostream class and it is used to associate a file with an output buffer so that the file can be written onto.
(3) fstream is derived from iostream class and it is used to associate a file with a buffer so that the file can be read from as well as written onto.
(Source: Computer Science textbook for class XII by Sumita Arora. The chapter is Data File Handling)
Similar questions