Butula TVC DICT II Object Oriented programming Quiz

Butula TVC DICT II Object Oriented programming Quiz

University

10 Qs

quiz-placeholder

Similar activities

17 course French classical menu 01

17 course French classical menu 01

University

10 Qs

BSHM65

BSHM65

University

10 Qs

UFO Quiz

UFO Quiz

University

10 Qs

Iron Man

Iron Man

1st Grade - University

12 Qs

Games Summer Course Day 1

Games Summer Course Day 1

University

15 Qs

A4/B3 Maintenance Assessment Power transmission system

A4/B3 Maintenance Assessment Power transmission system

University

15 Qs

Alberta Natural Resources #2

Alberta Natural Resources #2

KG - University

12 Qs

Accounting 100

Accounting 100

University

13 Qs

Butula TVC DICT II Object Oriented programming Quiz

Butula TVC DICT II Object Oriented programming Quiz

Assessment

Quiz

Other

University

Practice Problem

Medium

Created by

Andrew Wakoli

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

What is the purpose of decision-making statements in programming?

To define variables

To create loops in the program

To specify conditions for code execution

To execute code without conditions

2.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

What does the 'if' statement in C++ require?

A boolean expression and a loop

A boolean expression and one or more statements

A boolean expression and a single statement

Only a boolean expression

3.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

What will happen if the boolean expression in an 'if' statement evaluates to false?

The program will terminate

The code inside the 'if' block will execute

The code after the 'if' statement will execute

The 'else' block will execute

4.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

In an 'if...else' statement, what does the 'else' block do?

Is optional and can be omitted

Always executes regardless of the condition

Executes when the 'if' condition is true

Executes when the 'if' condition is false

5.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

What is the output of the following code if the input is -5? 'if (X > 0) { Z = X + 10; } else { Z = 2 * X + 50; }'

Z = 0

Z = 40

Z = -10

Z = 10

6.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

What does the switch statement allow a programmer to do?

Handle exceptions

Define functions

Create loops

Choose between multiple alternatives based on an expression

7.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

In the switch statement, what does the 'default' case represent?

A case that always executes

A case that executes if no other cases match

The last case in the switch

The first case in the switch

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?