Search Header Logo

C++ SHS B1-B2

Authored by John Oli

Computers

11th Grade

Used 1+ times

C++ SHS B1-B2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

True or False: In C++, the `cout` object is used to output data to the console.

True

False

2.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

True or False: The following code will correctly declare an integer variable in C++:

int number = 5;

True

False

3.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

True or False: The `<<` operator is used with `cout` for input operations.

True

False

Answer explanation

False (It is used for output operations)

4.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

True or False:

The statement `cout >> "Hello, World!";` is a valid way to print "Hello, World!" in C++.

True

False

Answer explanation

False (The correct syntax is `cout << "Hello, World!";`)

5.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

True or False: In C++, a variable declared as `float` can store decimal values.

True

False

6.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

True or False:

The following code snippet will print `25` to the console:

int x = 5; cout << x * 5;

True

False

7.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

True or False:

The keyword `double` is used in C++ to declare a variable that can store a floating-point number with double precision.

True

False

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?