WorksheetsFREEZER QUIZLINE
Total questions: 11
Worksheet time: 7mins
What does the acronym "C#" stand for?
CommonSharp
ComputerSharp
C-Sharp
CentralSharp
How do you declare a constant variable in C#?
const int x = 10;
constant x = 10;
int constant x = 10;
int x = const 10;
Which of the following is NOT a valid C# data type?
float
char
decimal
byte-pointer
In C#, what is the purpose of the "foreach" loop?
It is used for arithmetic calculations.
It iterates over a collection of items.
It defines a conditional block of code.
It is used for exception handling.
What is the default access modifier for class members in C#?
public
private
protected
internal
Which keyword is used to instantiate an object in C#?
new
instantiate
create
object
How do you comment a single-line in C#?
// This is a comment
/* This is a comment */
# This is a comment
-- This is a comment
What is the purpose of the "try-catch" block in C#?
It defines a loop.
It handles exceptions and errors.
It is used for conditional execution.
It declares variables.
What is the role of the "using" directive in C#?
It includes external libraries.
It creates a new instance of a class.
It defines a loop.
It is used for mathematical calculations.
How do you declare a method in C# that does not return any value?
void myMethod() { }
int myMethod() { }
string myMethod() { }
double myMethod() { }
What is the importance of C#?
