What is the default value of an int in C#?

C# Fundamentals Assessment

Quiz
•
Computers
•
University
•
Medium
roop lal
Used 2+ times
FREE Resource
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
-1
0
1
null
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a value type in C#?
string
bool
float
int
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What keyword is used to define a method in C#?
method
void
define
function
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare a string variable in C#?
string myString;
myString: string;
string myVariable = 'Hello';
var myString = 'Hello';
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'if' statement in C#?
The 'if' statement is used for conditional execution of code.
The 'if' statement is used to define classes.
The 'if' statement is used for looping through arrays.
The 'if' statement is used to declare variables.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the syntax for a switch statement in C#?
switch (variable) { case value1: // code block; }
switch (variable) { case value1: // code block; default: // code block; }
switch { case value1: // code block; break; }
switch (variable) { case value1: // code block; break; case value2: // code block; break; default: // code block; }
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare a boolean variable in C#?
int isTrue;
boolean isTrue = true;
bool isTrue; or bool isTrue = true;
string isTrue = 'true';
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code: Console.WriteLine(5 > 3);?
False
True
5 < 3
3 > 5
9.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which data type would you use to store a character in C#?
float
char
string
int
Similar Resources on Quizizz
10 questions
C Programming Quiz-5

Quiz
•
University
10 questions
Q1 - Python

Quiz
•
University
10 questions
Workshop 2 Review

Quiz
•
University
11 questions
Array

Quiz
•
University
12 questions
Quiz 9: Pointer

Quiz
•
University
10 questions
Python Basics Quiz

Quiz
•
7th Grade - University
10 questions
Chapter 1: Python Overview

Quiz
•
University
11 questions
Control Structures - Selection in Python

Quiz
•
8th Grade - University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade