AP Computer Science A : Class Libraries

Study concepts, example questions & explanations for AP Computer Science A

varsity tutors app store varsity tutors android store

Example Questions

Example Question #1 : Class Libraries

Which of the following header statements allow you to omit using the std:: when using cout?

Possible Answers:

#include <iostream>

#include <standard>

using namespace std;

#include  <cmath>

You don't need a header statement.

Correct answer:

using namespace std;

Explanation:

You must put using namespace std; at the top of your file to avoid having to type std:: every time you use cout and cin.

Learning Tools by Varsity Tutors

Incompatible Browser

Please upgrade or download one of the following browsers to use Instant Tutoring: