
Butula TVC DICT II Object Oriented programming Quiz
Quiz
•
Other
•
University
•
Practice Problem
•
Medium
Andrew Wakoli
Used 2+ times
FREE Resource
Enhance your content in a minute
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
12 questions
National Day Quiz
Quiz
•
University
13 questions
football of world
Quiz
•
1st Grade - University
13 questions
Anime 99
Quiz
•
9th Grade - Professio...
10 questions
QUIZ TPHTP 5 - Pengolahan Teh Hitam
Quiz
•
University
10 questions
MGT 269 Chapter 6: Job Application Letter & Resume
Quiz
•
University
10 questions
Infancy
Quiz
•
4th Grade - Professio...
12 questions
Week 16 - Primary Survey Recap
Quiz
•
University - Professi...
15 questions
Overview of E-Banking
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
Discover more resources for Other
7 questions
How James Brown Invented Funk
Interactive video
•
10th Grade - University
5 questions
Helping Build the Internet: Valerie Thomas | Great Minds
Interactive video
•
11th Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
19 questions
Review2-TEACHER
Quiz
•
University
15 questions
Pre2_STUDENT
Quiz
•
University
20 questions
Ch. 7 Quadrilateral Quiz Review
Quiz
•
KG - University
