
Butula TVC DICT II Object Oriented programming Quiz
Authored by Andrew Wakoli
Other
University
Used 2+ times

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 • 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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
SHINE
Quiz
•
University
10 questions
EFFECTIVE GROUP DISCUSSION
Quiz
•
9th Grade - University
10 questions
Business Ethics
Quiz
•
University
10 questions
CALCITONIN (MUSCULOSKELETAL)
Quiz
•
University
10 questions
BTS
Quiz
•
University
10 questions
UK Knowledge Test
Quiz
•
University
10 questions
Alien Hand Syndrome
Quiz
•
University
10 questions
Introduction to CSS
Quiz
•
University
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Other
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
5 questions
What is Presidents' Day?
Interactive video
•
10th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
20 questions
Mardi Gras History
Quiz
•
6th Grade - University
10 questions
The Roaring 20's Crash Course US History
Interactive video
•
11th Grade - University
17 questions
Review9_TEACHER
Quiz
•
University