Understanding C# Conditional Statements
Quiz
•
Computers
•
11th Grade
•
Practice Problem
•
Easy
Emily Chard
Used 6+ times
FREE Resource
Enhance your content in a minute
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
Already have an account?
Similar Resources on Wayground
13 questions
LENGUAJE C
Quiz
•
11th Grade
16 questions
Tips for Searching the Internet
Quiz
•
6th Grade - University
16 questions
Hour_of_Code
Quiz
•
5th - 12th Grade
15 questions
Google Spreadsheet
Quiz
•
11th Grade
20 questions
икт 21-40
Quiz
•
1st Grade - University
20 questions
Skill Competition Quiz 2024
Quiz
•
10th Grade - University
11 questions
Types of Mass Media
Quiz
•
10th Grade - Professi...
11 questions
Programming basics
Quiz
•
10th - 11th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
15 questions
Christmas Song Emoji Pictionary
Quiz
•
7th - 12th Grade
20 questions
Christmas Movies
Quiz
•
1st - 12th Grade
20 questions
Christmas Movie Trivia
Quiz
•
9th - 12th Grade
29 questions
christmas facts
Lesson
•
5th - 12th Grade
20 questions
Christmas Trivia
Quiz
•
5th - 12th Grade
20 questions
Stages of Meiosis
Quiz
•
9th - 12th Grade
20 questions
christmas songs
Quiz
•
KG - University
