What is the difference between ofstream and ifstream in C++ file handling?
1) ofstream is for reading, and ifstream is for writing
2) ofstream is for bidirectional file access, and ifstream is for unidirectional file access
3) ofstream is for writing, and ifstream is for reading
4) There is no difference between them