int x = 2;
if (x > 3)
printf("Hello");
else
printf("World");
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
10 questions
Input And Output in C
Quiz
•
University
9 questions
c language quiz
Quiz
•
University
10 questions
C - Pointers
Quiz
•
University
10 questions
Array in C
Quiz
•
University
10 questions
FLASH
Quiz
•
University
10 questions
Basics Of C Programming
Quiz
•
University
6 questions
sample qizz
Quiz
•
University
6 questions
Unit 13 Function and decision
Quiz
•
University
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade