IMS505 Recap

IMS505 Recap

University

18 Qs

quiz-placeholder

Similar activities

control system

control system

University

20 Qs

Orientation Quiz

Orientation Quiz

University

20 Qs

Python Quiz_Module2

Python Quiz_Module2

University

20 Qs

Chapter 2 - Planning

Chapter 2 - Planning

University

20 Qs

UTMT Workshop (Hearsay)

UTMT Workshop (Hearsay)

University

13 Qs

Compile Error Set  4

Compile Error Set 4

University

20 Qs

Together We Grow - 2

Together We Grow - 2

University

15 Qs

Midterm 2 Quiz

Midterm 2 Quiz

University

16 Qs

IMS505 Recap

IMS505 Recap

Assessment

Quiz

Other

University

Hard

Created by

ENNA NAWI

Used 2+ times

FREE Resource

18 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to create an if-else statement in C++?

choice

selection

then

if

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are the three main selection statements in C++?

if, else, switch

for, while, do-while

continue, break, goto

if-else, switch-case, ternary operator

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary purpose of the if statement?

To repeat a block of code a specific number of times

To execute a block of code based on a condition

To terminate a loop prematurely

To jump to a different location in the code

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the else statement?

To provide an alternative block of code if the if condition is false

To repeat the if statement until a specific condition is met

To jump to the end of the program

To store a value in a variable

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The switch statement can evaluate multiple conditions simultaneously. True or False?

True

False

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the break statement within a switch statement?

To repeat the switch statement until a specific condition is met

To jump to the next case in the switch statement

To terminate the switch statement and exit the current case

To store a value in a variable

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the syntax for an if statement in C++?

if (condition) then { statement; }

if (condition) then { statement; }

if(condition) { statement; } else { statement; }

if(condition) { statement; }

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?