Understanding C# Conditional Statements

Understanding C# Conditional Statements

11th Grade

16 Qs

quiz-placeholder

Similar activities

โปรแกรมตารางงาน ทดสอบปลายภาค ชุดที่1

โปรแกรมตารางงาน ทดสอบปลายภาค ชุดที่1

10th - 12th Grade

20 Qs

TIN 11 BÀI 11 KIỂU MẢNG

TIN 11 BÀI 11 KIỂU MẢNG

11th Grade

18 Qs

Cascading Style Sheets

Cascading Style Sheets

8th - 12th Grade

11 Qs

Начала программирования на языке Паскаль

Начала программирования на языке Паскаль

8th - 11th Grade

15 Qs

Chapter 3: Storage devices and media (Part 2):

Chapter 3: Storage devices and media (Part 2):

10th - 11th Grade

15 Qs

What is a computer

What is a computer

KG - University

11 Qs

STARFIELD MID-TERM 2

STARFIELD MID-TERM 2

9th - 12th Grade

15 Qs

Understanding C# Conditional Statements

Understanding C# Conditional Statements

Assessment

Quiz

Computers

11th Grade

Practice Problem

Easy

Created by

Emily Chard

Used 6+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?