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

Answer : C

Explanation

Both of the above options are correct.

Q 2 - Value type variables in C# are derived from the class System.ValueType?

A - true

B - false

Answer : A

Explanation

Value type variables in C# are derived from the class System.ValueType.

Q 3 - Which of the following converts a type to a double type in C#?

A - ToDecimal

B - ToDouble

C - ToInt16

D - ToInt32

Answer : B

Explanation

ToDouble() method converts a type to a double type.

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

A - ToType

B - ToUInt16

C - ToSingle

D - ToString

Answer : B

Explanation

ToUInt16() method converts a type to an unsigned int type.

Q 5 - Which of the following access specifier in C# allows a class to expose its member variables and member functions to other functions and objects in the current assembly?

A - Public

B - Private

C - Protected

D - Internal

Answer : D

Explanation

Internal access specifier allows a class to expose its member variables and member functions to other functions and objects in the current assembly.

Q 6 - 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 8 - Dynamic polymorphism is implemented by abstract classes and virtual functions.

A - true

B - false

Answer : A

Explanation

Dynamic polymorphism is implemented by abstract classes and virtual functions.

Q 9 - Which of the following preprocessor directive allows you to undefine a symbol in C#?

A - define

B - undef

C - region

D - endregion

Answer : B

Explanation

#undef: It allows you to undefine a symbol.

csharp_questions_answers.htm

Useful Video Courses


Video

2D Games Development using Unity and C#

119 Lectures 23.5 hours

Raja Biswas

Video

C# Console and Windows Forms Development with LINQ & ADO.NET

37 Lectures 13 hours

Trevoir Williams

Video

Fixing Common Errors in Unity C#

16 Lectures 1 hours

Peter Jepson

Video

ASP.NET CORE and C# REST API With Real World Projects

159 Lectures 21.5 hours

Ebenezer Ogbu

Video

AutoCAD Programming Using C#.NET - Beginner Course

193 Lectures 17 hours

Arnold Higuit

Video

The Beginner's Guide to C#

24 Lectures 2.5 hours

Eric Frick

Advertisements