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 is a contextual keyword in C#?

A - get

B - set

C - add

D - All of the above.

Answer : D

Explanation

All of the above options are contextual keywords.

Q 3 - Which of the following converts a type to a 16-bit integer in C#?

A - ToDecimal

B - ToDouble

C - ToInt16

D - ToInt32

Answer : C

Explanation

ToInt16() method converts a type to a 16-bit integer.

Q 4 - Which of the following converts a type to an unsigned long type in C#?

A - ToType

B - ToUInt16

C - ToUInt32

D - ToString

Answer : C

Explanation

ToUInt32() method converts a type to an unsigned long type.

Q 5 - Which of the following method copies the actual value of an argument into the formal parameter of the function?

A - Value parameters

B - Reference parameters

C - Output parameters

D - None of the above.

Answer : A

Explanation

Value parameters method copies the actual value of an argument into the formal parameter of the function.

Answer : D

Explanation

All of the above options are correct.

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

A - true

B - false

Answer : B

Explanation

Opeator overloading is a kind of static polymorphism.

Q 9 - You can define one namespace inside another namespace.

A - true

B - false

Answer : A

Explanation

You can define one namespace inside another namespace. You can access members of nested namespace by using the dot (.) operator.

Q 10 - The System.SystemException class is the base class for all predefined system exception in C#?

A - true

B - false

Answer : A

Explanation

The System.SystemException class is the base class for all predefined system exception.


csharp_questions_answers.htm

Advertisements
E-Books Store