C++ Chapter 5

C++ Chapter 5

University

17 Qs

quiz-placeholder

Similar activities

Intro to Scratch 2

Intro to Scratch 2

KG - University

12 Qs

C Language Loop and Array Quiz

C Language Loop and Array Quiz

University

22 Qs

Computer Science

Computer Science

9th Grade - University

15 Qs

More on JavaScript

More on JavaScript

University

19 Qs

PYTHON BOOTCAMP

PYTHON BOOTCAMP

University

15 Qs

Post-Test AJAX - PHP

Post-Test AJAX - PHP

University

15 Qs

Python Programming

Python Programming

University

20 Qs

while loop

while loop

University

15 Qs

C++ Chapter 5

C++ Chapter 5

Assessment

Quiz

Computers

University

Medium

Created by

Albert Gorup

Used 19+ times

FREE Resource

17 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

A while loop's body can contain multiple statements, as long as they are enclosed in braces.

True

False

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

The scope of a variable declared in a for loop's initialization expression always extends beyond the body of the loop.

True

False

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

The condition that is tested by a while loop must be enclosed in parentheses and terminated with a semicolon.

True

False

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

The update expression of a for loop can contain more than one statement, for example:

for(i = 5; i <= 10; i++, total+= sales)

True

False

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

You may nest while and do-while loops but you may not nest for loops.

True

False

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

These are operators that add and subtract one from their operands.

plus and minus

++ and --

binary and unary

conditional and relational

binary and ternary

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Something within a while loop must eventually cause the condition to become false or a(n) __________ results.

null value

infinite loop

unexpected exit

compiler error

None of these

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?