C# Mock Test



This section presents you various set of Mock Tests related to C#. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.

Questions and Answers

C# Mock Test III

Q 4 - Which of the following property of Array class in C# checks whether the Array has a fixed size?

A - IsFixedSize

B - IsStatic

C - Length

D - None of the above.

Answer : A

Explanation

IsFixedSize gets a value indicating whether the Array has a fixed size.

Q 5 - Which of the following property of Array class in C# checks whether the Array is readonly?

A - IsFixedSize

B - IsReadOnly

C - Length

D - None of the above.

Answer : B

Explanation

IsReadOnly gets a value indicating whether the Array is readonly.

Q 6 - Which of the following property of Array class in C# gets a 32-bit integer, the total number of elements in all the dimensions of the Array?

A - Rank

B - LongLength

C - Length

D - None of the above.

Answer : C

Explanation

Length gets a 32-bit integer that represents the total number of elements in all the dimensions of the Array.

Q 7 - Which of the following property of Array class in C# gets a 64-bit integer, the total number of elements in all the dimensions of the Array?

A - Rank

B - LongLength

C - Length

D - None of the above.

Answer : B

Explanation

LongLength gets a 64-bit integer that represents the total number of elements in all the dimensions of the Array.

Q 8 - Which of the following property of Array class in C# gets the rank (number of dimensions) of the Array?

A - Rank

B - LongLength

C - Length

D - None of the above.

Answer : A

Explanation

Rank gets the rank (number of dimensions) of the Array.

Answer : D

Explanation

All of the above options are correct.

Answer : D

Explanation

All of the above options are correct.

Q 13 - Which of the following is the default access specifier of a class?

A - Private

B - Public

C - Protected

D - Internal

Answer : D

Explanation

Default access specifier for a class type is Internal.

Q 14 - Which of the following is the default access specifier of a class member variable?

A - Private

B - Public

C - Protected

D - Internal

Answer : A

Explanation

Default access for the class member variables is Private.

Q 15 - Which of the following is the default access specifier of a class member function?

A - Private

B - Public

C - Protected

D - Internal

Answer : A

Explanation

Default access for the class member function is Private.

Answer : D

Explanation

All of the above options are correct.

Q 22 - C# supports multiple inheritance.

A - true

B - false

Answer : B

Explanation

C# does not support multiple inheritance.

Q 23 - C# does not support multiple inheritance.

A - true

B - false

Answer : A

Explanation

C# does not support multiple inheritance.

Q 24 - Function overloading is a kind of static polymorphism.

A - true

B - false

Answer : A

Explanation

Function overloading is a kind of static polymorphism.

Q 25 - Operator overloading is a kind of dynamic polymorphism.

A - true

B - false

Answer : B

Explanation

Opeator overloading is a kind of static polymorphism.

Answer Sheet

Question Number Answer Key
1 D
2 D
3 D
4 A
5 B
6 C
7 B
8 A
9 D
10 D
11 D
12 D
13 D
14 A
15 A
16 C
17 C
18 C
19 C
20 C
21 D
22 B
23 A
24 A
25 B
csharp_questions_answers.htm
Advertisements