
Control Statements

Quiz
•
Information Technology (IT)
•
University
•
Hard
Shivanthana 2909
Used 4+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A smartwatch needs to alert the user when the battery drops below 20%. Which control statement should be used?
Switch-case
for loop
if-else
do-while
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A game controller must perform different actions when different buttons are pressed (A = Jump, B = Crouch, etc.). What is the best control structure?
if-else
nested loops
switch-case
break
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int x = 5;
if (x > 3)
printf("Hello");
else
printf("Bye");
Hello
Bye
error
No output
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
You’re building an automation system for a smart air conditioner. Based on temperature input, it decides to turn the fan ON or OFF. What would you use?
switch-cse
if-else
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct syntax for an if-else statement in C?
if condition then { } else { }
if (condition) { } else { }
if {condition} then { } else { }
if condition: { } else: { }
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT true about the switch-case statement in C?
It can evaluate expressions like x > 10
It uses case labels for matching values
It can replace lengthy nested if-else structures
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
You are designing a coffee machine. It should display different prices based on size (S, M, L). Which control is most appropriate?
if-else with relational operators
for loop with size check
switch-case with character input
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
高二資訊課補考題目

Quiz
•
11th Grade - University
10 questions
Getting Started with C

Quiz
•
University
10 questions
Kuis Makro Week 3

Quiz
•
University
10 questions
Fundamentos de Programación en Python

Quiz
•
6th Grade - University
13 questions
DIGITAL LITERACY

Quiz
•
12th Grade - University
10 questions
Quiz on Blockly Programming (Fundametal - P2)

Quiz
•
7th Grade - University
13 questions
Chapter 7: Information Systems

Quiz
•
University
12 questions
Review loops

Quiz
•
8th Grade - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Information Technology (IT)
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University