Which C++ file mode is used to open a file for reading?

Options

  • A. ios::out
  • B. ios::app
  • C. ios::in
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

C. ios::in

Detailed Explanation

Correct Answer: Option C — ios::in

Explanation: ios::in opens a file for input, typically for reading. If the file does not exist, opening it for input normally fails.