
C Programming: if-then-else Quiz
Authored by joel borah
Computers
12th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Explain the use of else if statement in C programming.
It is used to declare a variable in C programming
It is used to end the program in C programming
It is used to repeat a block of code in C programming
It is used to check multiple conditions and execute a different block of code for each condition.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the conditional operator in C?
To make a decision based on a condition
To define functions
To create loops
To perform mathematical calculations
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is my result?
mickey = mouse .
if mickey == mouse: .
. print("Mickey is a mouse")
.else: .
. print("Minnie rules") .
'Mickey is a mouse"
"Minnie Rules"
Nothing is printed
"Mickey is a mouse and Minnie rules"
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is my result?
john = 6 .
if john != 6: .
. print("John is getting ice cream")
else: .
. print("John is getting apple juice")
. print("John is getting grapes")
John is getting ice cream
John is getting grape
John is getting apple juice
John is getting apple juice
John is getting grapes
John is getting ice cream
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is an "ELSE" statement?
Assigns a value to a variable
Adds another command the code will execute
A function that is performed if the "if" statement is not satisfied
Runs the statement coded if anything else in the code does not run as anticipated.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the conditional operators used in if-else statements in C programming?
print, scan, loop
+, -, *, /
==, !=, >, <, >=, <=
&&, ||, !
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you use the '==' operator in an if-else statement in C?
To compare two values for equality in a conditional statement.
To check if a variable is initialized in an if-else statement
To perform addition in an if-else statement
To print a message in an if-else statement
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
10 questions
Java: repetition control structure for & while
Quiz
•
10th - 12th Grade
12 questions
Microsoft Office Word
Quiz
•
4th Grade - University
10 questions
MIL Reviewer 2 - DepEd Common
Quiz
•
12th Grade
11 questions
Python Function
Quiz
•
11th - 12th Grade
10 questions
Computer Languages
Quiz
•
6th - 12th Grade
10 questions
python quiz
Quiz
•
6th Grade - Professio...
10 questions
What is a program slides(6:16)
Quiz
•
8th - 12th Grade
10 questions
Breakthrough!
Quiz
•
12th Grade
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
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
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
21 questions
Presidents Day Trivia
Quiz
•
6th - 12th Grade
10 questions
Valentine's Day: History and Modern Celebration
Interactive video
•
9th - 12th Grade
11 questions
Valentine's Day Trivia
Quiz
•
8th - 12th Grade
10 questions
Factor Quadratic Expressions with Various Coefficients
Quiz
•
9th - 12th Grade
18 questions
Success Strategies
Quiz
•
9th - 12th Grade
10 questions
Valentine's Day Trivia
Quiz
•
9th - 12th Grade