C# Online Quiz


Advertisements


Following quiz provides Multiple Choice Questions (MCQs) related to C#. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Q 1 - Which of the following variable types can be assigned a value directly in C#?

A - Value types

B - Reference types

C - Pointer types

D - All of the above.

Answer : A

Explanation

Value type variables can be assigned a value directly.

Answer : C

Explanation

Both of the above options are correct.

Q 3 - Which of the following converts a type to a small floating point number in C#?

A - ToInt64

B - ToSbyte

C - ToSingle

D - ToInt32

Answer : C

Explanation

ToSingle() method converts a type to a small floating point number.

Q 4 - Which of the following operator returns the size of a data type in C#?

A - sizeof

B - typeof

C - &</a>

D - *

Answer : A

Explanation

sizeof() operator returns the size of a data type.

Q 5 - Which of the following method copies the reference to the memory location of an argument into the formal parameter?

A - Value parameters

B - Reference parameters

C - Output parameters

D - None of the above.

Answer : B

Explanation

Reference parameters method copies the reference to the memory location of an argument into the formal parameter.

Q 6 - 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.

Answer : D

Explanation

All of the above options are correct.

Answer : D

Explanation

All of the above options are correct.

Answer : C

Explanation

Both of the above options are correct.


csharp_questions_answers.htm

Advertisements