Unit 5 : Decision Control in C

Quiz
•
Computers
•
University
•
Easy
Abhishek Pandey
Used 2+ times
FREE Resource
6 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int x = 2;
if (x > 3)
printf("Hello");
else
printf("World");
Hello
error
World
None
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the else block?
To execute when the if condition is true
To terminate the program
To execute when the if condition is false
None
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int x = 0;
if (x)
printf("True");
else
printf("False");
True
error
None
False
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many else if blocks can you have in an if-else if ladder?
Only one
Two
Any number
None
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of a break statement in switch?
It breaks the program
It terminates the current block and exits the switch
It skips to the next case
None
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if a break statement is missing in a switch case?
The program will not compile
Only the default case executes
An infinite loop is created
Fall-through to the next case occurs
Similar Resources on Wayground
10 questions
unidad4

Quiz
•
University
10 questions
Golang Complete Guide for Back End

Quiz
•
University
10 questions
Rapid Round 1

Quiz
•
University
9 questions
c language quiz

Quiz
•
University
10 questions
C - Pointers

Quiz
•
University
10 questions
Java Control Flow statements

Quiz
•
University
10 questions
CIS1101-programming practice2

Quiz
•
University
10 questions
Basics Of C Programming

Quiz
•
University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade