
Control Statements
Authored by Shivanthana 2909
Information Technology (IT)
University
Used 8+ 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 • 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
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
15 questions
CMDP2063 Unix and C Programming
Quiz
•
University
10 questions
Экзамин
Quiz
•
University
10 questions
Sequencing Blockly - 1
Quiz
•
7th Grade - University
9 questions
g11- Planning and Installing Systems Quiz
Quiz
•
11th Grade - University
12 questions
Графічний інтерфейс Python
Quiz
•
12th Grade - University
15 questions
AI Statistics and Trends Quiz
Quiz
•
9th Grade - University
15 questions
แข่งขันcodingม.ปลาย
Quiz
•
12th Grade - University
13 questions
Introduction To Programming - Lesson Exception Handling
Quiz
•
11th Grade - 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
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
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Information Technology (IT)
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University