
Quiz on Selective Structures in Programming

Quiz
•
Computers
•
University
•
Medium
NUR ENZAI
Used 1+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the most basic selective statement?
while loop
for loop
if statement
switch statement
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if the condition in an if statement is FALSE?
The statement is executed
The statement is skipped
The program terminates
The condition is re-evaluated
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In an if...else statement, what is executed if the condition is TRUE?
Statement B
Statement A
Both statements
None of the statements
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the switch...case statement?
To create loops
To define functions
To execute a single statement
To substitute for long if statements
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What must follow each case label in a switch statement?
exit
break
return
continue
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does a nested if structure involve?
Multiple switch statements
An if statement within another if statement
A function within an if statement
A loop within an if statement
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the syntax for an if...else...if statement?
if condition 1, statement 1; else if condition 2, statement 3;
if condition 1, statement 1; else statement 2;
if condition 1, statement 1; else if condition 2, statement 2;
if condition 1, statement 1; if condition 2, statement 2;
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Control Structures C#

Quiz
•
University
20 questions
L73_118 Prep for Test

Quiz
•
12th Grade - University
10 questions
LINUX MODULE 03 QUIZ

Quiz
•
University
10 questions
Java quiz 1

Quiz
•
University
10 questions
Unit 2 Python

Quiz
•
University
20 questions
Advanced Excel

Quiz
•
KG - University
10 questions
DECISION MAKING IN C

Quiz
•
University
10 questions
FOP - CHAPTER 6

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University