
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
Списки Python + Pygame
Quiz
•
KG - University
12 questions
1.2.4. Types of Programming Language
Quiz
•
12th Grade
11 questions
Types of Mass Media
Quiz
•
10th Grade - Professi...
10 questions
BTEC National ICT U2 - Microsoft Access
Quiz
•
12th Grade
10 questions
Dastan
Quiz
•
12th Grade
10 questions
BTEC National U2 - Testing Tables (Paper - Part A)
Quiz
•
12th Grade
10 questions
Arduino X-3
Quiz
•
9th - 12th Grade
10 questions
Programming with C++
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
10 questions
Probability Practice
Quiz
•
4th Grade
15 questions
Probability on Number LIne
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
6 questions
Appropriate Chromebook Usage
Lesson
•
7th Grade
10 questions
Greek Bases tele and phon
Quiz
•
6th - 8th Grade