Which of the following commands in C++ will open a text file NOTES.TXT for reading the content from it ?
Show answerHide answer
Correct answer: (A) ifstream F ("NOTES.TXT");
Explanation
ifstream opens a file for input (reading). ofstream is for writing. ios::read is not a valid mode.