Ace Your C++ Skills 2025 – Rock the ‘Thinking in C++’ Challenge!

Question: 1 / 565

Which C++ header file must be included to use cout and cin objects?

<iostream>

To use cout and cin objects in C++, the <iostream> header file must be included. This header file contains the definitions of the standard input/output stream objects, including cout and cin. Option B, <istream>, only contains the definition for the standard input stream object, so it is not the correct answer. Option C, <ostream>, only contains the definition for the standard output stream object, so it is also not the correct answer. Lastly, option D, <stdio.h>, is a header file for the C programming language and does not contain the definitions for cout and cin in C++, making it an incorrect answer. Therefore, the correct answer is A, <iostream>.

Get further explanation with Examzify DeepDiveBeta

<istream>

<ostream>

<stdio.h>

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy