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

Disable ads (and more) with a premium pass for a one time $4.99 payment

Test your C++ skills with our quiz based on Bruce Eckel's 'Thinking in C++'. Dive into object-oriented programming, advanced topics, and fundamentals. Perfect for learners and experts alike. Assess your knowledge and become a C++ master!

To use cout and cin objects in C++, the header file must be included. This header file contains the definitions of the standard input/output stream objects, including cout and cin. Option B, , only contains the definition for the standard input stream object, so it is not the correct answer. Option C, , 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, .

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy