Understanding C# Conditional Statements
Quiz
•
Computers
•
11th Grade
•
Easy
Emily Chard
Used 6+ times
FREE Resource
16 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following C# code snippet? ```csharp int a = 5; if (a == 5) { Console.WriteLine("Equal"); } ```
No output
Equal
Error
Not Equal
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following C# code: ```csharp int b = 10; if (b != 10) { Console.WriteLine("Not Equal"); } else { Console.WriteLine("Equal"); } ``` What will be printed?
Not Equal
Equal
Error
No output
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In C#, which of the following operators is used to check if two values are not equal?
==
!=
>
<
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following C# code snippet? ```csharp int c = 15; if (c > 10) { Console.WriteLine("Greater"); } else { Console.WriteLine("Not Greater"); } ```
Greater
Not Greater
Error
No output
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following C# statements correctly checks if a variable `d` is less than or equal to 20?
if (d < 20)
if (d <= 20)
if (d == 20)
if (d >= 20)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following C# code snippet? ```csharp int e = 25; if (e < 20) { Console.WriteLine("Less"); } else if (e == 25) { Console.WriteLine("Equal"); } else { Console.WriteLine("Greater"); } ```
Less
Equal
Greater
Error
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a C# switch statement, which keyword is used to exit a case block?
exit
break
continue
stop
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
20 questions
Technology Innovations
Quiz
•
5th - 12th Grade
18 questions
PC Component Identification
Quiz
•
6th - 12th Grade
16 questions
Python programming
Quiz
•
6th - 12th Grade
20 questions
HTML Test
Quiz
•
9th - 12th Grade
20 questions
Google Apps (short)
Quiz
•
1st - 12th Grade
19 questions
Bill Gates
Quiz
•
6th - 12th Grade
20 questions
Phishing quiz
Quiz
•
1st - 12th Grade
20 questions
ULANGAN HARIAN INFORMATIKA KELAS 7
Quiz
•
11th Grade
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
6 questions
FOREST Self-Discipline
Lesson
•
1st - 5th Grade
7 questions
Veteran's Day
Interactive video
•
3rd Grade
20 questions
Weekly Prefix check #2
Quiz
•
4th - 7th Grade
Discover more resources for Computers
28 questions
Ser vs estar
Quiz
•
9th - 12th Grade
19 questions
Explore Triangle Congruence and Proofs
Quiz
•
9th - 12th Grade
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
DNA Replication Concepts and Mechanisms
Interactive video
•
7th - 12th Grade
20 questions
Food Chains and Food Webs
Quiz
•
7th - 12th Grade
15 questions
Identify Triangle Congruence Criteria
Quiz
•
9th - 12th Grade
23 questions
Similar Figures
Quiz
•
9th - 12th Grade
20 questions
SSS/SAS
Quiz
•
9th - 12th Grade
