
C# Programming Essentials

Quiz
•
Professional Development
•
Professional Development
•
Medium
Rodrigo Calapan
Used 1+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the default value of an int in C#?
-1
1
null
0
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which data type is used to store a single character in C#?
string
float
int
char
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What keyword is used to define a conditional statement in C#?
else
when
if
switch
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you write an if statement in C#?
if (condition) { // code to execute }
if condition { // code to execute }
if (condition) // code to execute
if { condition } // code to execute
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the else clause in an if-else statement?
To create a loop that repeats the if condition.
To execute a block of code when the if condition is true.
To execute a block of code when the if condition is false.
To define a function that runs before the if statement.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Can you nest if statements in C#? Give an example.
if (condition1) { if (condition2) { // Code to execute if condition1 is false } }
Example: if (condition1) { if (condition2) { // Code to execute if both condition1 and condition2 are true } }
if (condition1) { // Code to execute }
if (condition1 && condition2) { // Code to execute if either condition is true }
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the syntax for a switch statement in C#?
switch (variable) { case value1: // code block; break; case value2: // code block; break; default: // code block; }
switch: variable { case value1: // code block; }
switch (variable) case value1: // code block; break;
switch variable { case value1: // code block; }
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
python dictionary and set

Quiz
•
Professional Development
10 questions
Digital Design Quiz 1

Quiz
•
Professional Development
10 questions
Volza 1st Intermediate quiz

Quiz
•
Professional Development
20 questions
Email Writing & Etiquette

Quiz
•
Professional Development
14 questions
ABREDES - Devasc Python

Quiz
•
Professional Development
13 questions
Python Quiz : Loop

Quiz
•
Professional Development
15 questions
Nodejs - Testing

Quiz
•
Professional Development
10 questions
Python LIST

Quiz
•
Professional Development
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade