Datatype
Test
Model Test
Ebook
Test on C#.Net framwork 4 Sep 30
CSharp Model Test 1
CSharp Model Test Three
Index
C#.NET Home
Datatype
59
Basic
28
Methods
5
Arrays
3
Object-Oriented Programming
11
Operators
53
Control Structure
18
Schools
Ebook
Question:
Which data type would you use to store a single Unicode character in C#?
A
string
B
char
C
byte
D
int
Note:
Not available
Show answer
Show Note
Report
Question:
Which keyword is used to declare a variable whose value can only be assigned in the constructor?
A
const
B
static
C
readonly
D
final
Note:
Not available
Show answer
Show Note
Report
Question:
What is the purpose of the readonly keyword in C#?
A
To make a variable accessible only in read mode
B
To prevent modifying the variable after initialization
C
To make the variable accessible in all derived classes
D
To declare a variable as a constant
Note:
Not available
Show answer
Show Note
Report
Question:
Which data type is used for financial calculations requiring high precision?
A
float
B
double
C
decimal
D
int
Note:
Not available
Show answer
Show Note
Report
Question:
What will happen if you try to assign a float to an int without casting?
A
The value will be implicitly cast
B
A compilation error will occur
C
The value will be rounded to the nearest integer
D
The decimal part will be ignored
Note:
Not available
Show answer
Show Note
Report
Question:
Which of the following is the default value of a string variable in C#?
A
""
B
null
C
"default"
D
"null"
Note:
Not available
Show answer
Show Note
Report
Question:
What is the maximum value of an int in C#?
A
32767
B
2147483647
C
9223372036854775807
D
1000000000
Note:
Not available
Show answer
Show Note
Report
Question:
Which type is used to represent 64-bit signed integers in C#?
A
int
B
long
C
byte
D
short
Note:
Not available
Show answer
Show Note
Report
Question:
What is the default value of a float variable in C#?
A
0
B
0.0
C
Null
D
1.0
Note:
Not available
Show answer
Show Note
Report
Question:
Which data type represents a single precision floating-point number in C#?
A
double
B
float
C
decimal
D
int
Note:
Not available
Show answer
Show Note
Report
First
Prev
1
2
3
4
5
Next
Last
/6
Go
Schools
App Store
Whiteboard
Blogs
Quiz
Test
Apply Course
Games
Freelancers
Professionals
Newspapers
Terms
Privacy
Copyright © 2024. Powered by
Intellect Software Ltd