NEW
Font size
Worksheets.Net_Datatypes
Total questions: 10
Worksheet time: 5mins
Which of the following is a value type in C#?
string
dynamic
float
object
What does the sizeof(int) return in C# on most platforms?
2 bytes
4 bytes
8 bytes
platform-dependent
Converting a value type to object type is known as:
Casting
Parsing
unboxing
Boxing
Which of the following is NOT a reference type in C#?
integer
class
string
interface
Which identifier name is valid in C#?
2Value
first-name
_count
int
Which of the following is NOT allowed in a C# identifier?
alphabet
number
underscore
whitespace
Which data type has the largest size among the following?
int
long
float
decimal
What is the main difference between object and dynamic reference types?
Both are checked at compile time
object is compile-time checked; dynamic is runtime checked
Both are runtime checked
dynamic is faster than object
Which of the following correctly creates a verbatim(Ignoring Escape Sequences/Multilin) string literal in C#?
"Sample Text"
\"Sample Text"
@"Sample Text"
#”Sample Text”
What is the correct syntax for declaring a pointer to an integer in C#?
pointer int p;
int p*;
int* p;
*int p;
