Search Header Logo

Quiz on C++ Programming

Authored by magzhan.zhakanov apple_user

Others

KG

Quiz on C++ Programming
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the final value of x after execution? int x; for(x = 0; x < 10; x++) {}

9

10

11

Undefined

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? int x = 11; while(x > 7){ cout << x << "\t"; x--; }

11 10 9 8 7

10 9 8

11 10 9 8

11 10 9

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the final value of i? int i, j; for(i = 0; i < 5; i++){ for(j = 0; j < 3; j++){ if(i == 2) break; } }

2

3

4

5

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the final value of i? int i; for(i = 0; i <= 5; i++){ cout << i << endl; }

5

6

4

0

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be printed? int x = 0; while(x < 7){ x++; } cout << x;

6

7

8

Infinite loop

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the expression? 5 + 9*3^2 - 4 > 10 AND (2 + 2^4 - 8/4 > 6 OR (2 < 6 AND 10 > 11))

True

False

Compilation error

Undefined

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many times will the loop execute? for(int i = 0; i <= 5; i += 3);

1

2

3

Infinite

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?