Take C# MCQ Test to Test your Knowledge 

We have listed below the best C# MCQ Questions, that checks your basic knowledge of C#. This C# MCQ Test contains 30 best C# Multiple Choice Questions. You have to choose the right answer for every question. You can also download the C# MCQ Pdf for the best preparation of the C#/C sharp Interview.

Also, Read Best C# Interview Questions.

C# Online Test

1) C# was developed by

  • A. Bjarne Stroustrup
  • B.Anders Hejlsberg
  • C.Dennis M. Ritchie
  • D.Rasmus Lerdorf

2) Which of the following is the valid size of float data type?

  • A. 4 Bytes
  • B.6 Bytes
  • C.8 Bytes
  • D.10 Bytes

3) Which of the following String method is used to compare two strings with each other?

  • A. Compare To()
  • B.ConCat()
  • C.Compare()
  • D.Copy()

4) Which of the following Syntax is used for declaration and initialization of data variable?

  • A. ;
  • B. = ;
  • C.;
  • D. = ;

5) Which of the following is the subset of ‘int’ data type?

  • A. long, ulong, uint
  • B.long, float, double
  • C.long, float, ushort
  • D.long, ulong, ushort
Download Free : C# MCQ PDF

6) _________converts a type to a signed byte type in C#.

  • A. ToSingle
  • B.ToInt64
  • C.ToSbyte
  • D.ToInt32

7) Which of the following option is default access specifier of a class?

  • A. Protected
  • B.Internal
  • C.Private
  • D.Public

8) Which of the following keyword is used to refer baseclass constructor to subclass constructor?

  • A. static
  • B.This
  • C.base
  • D.extend

9) Which of the following keyword is used for correct implementation of an interface in C#.NET?

  • A. Interface
  • B.interface
  • C.intf
  • D.Intf

10) Which of following constructors is used to create an empty String object?

  • A. String(void)
  • B.String()
  • C.String(0)
  • D.All of the above

11) We use _________ to fully abstract a class from its implimentation.

  • A. Interfaces
  • B.objects
  • C.Packages
  • D.Function Definitions

12) C# class is inherit the multiple ____________.

  • A. Static classes
  • B.Interfaces
  • C.Classes
  • D.Abstract classes

13) Which of the following option is correct about indexer?

  • A. It allows enumerator with class
  • B.It creates index for instances of a class.
  • C.It allows an instance of a class to be indexed like an array
  • D.None of These

14) Which of the following option is correct about ReadOnly variables?

  • A. Value will be assigned when it accessed first time
  • B.Value will be assigned at compile time.
  • C.Value will be assigned at runtime.
  • D.All of the above

15) What is the full form of LINQ?

  • A. Local Integration Query
  • B.Language Integrated Query
  • C.Language Included Query
  • D.None of the above

16) ___________ is the right way of declaring an array.

  • A. int intArray[] = new int[5];
  • B.int[] intArray = new int[];
  • C.int[5] intArray = new int[];
  • D.int[] intArray = new int[5];

17) Which of the following is a Reference?

  • A. Pre-defined data type
  • B.Copy of class that is not initialized.
  • C.Copy of class creating by an existing instance.
  • D.Copy of class which leads to memory allocation.

18) Which of the following is not the ordered collection class?

  • A. Queue
  • B.BitArray
  • C.Stack
  • D.All of the above

19) Which of the following class contains only floating point functions?

  • A. Process
  • B.Math
  • C.System
  • D.Object

20) _______return absolute value of a variable.

  • A. Absolute()
  • B.Abs()
  • C.Absolutevariable()
  • D.All of the above

21) what is the latest version of c#?

  • A. 8.0
  • B.7.0
  • C.9.0
  • D.9.1

22) what is the file extension of c#?

  • A. .cs
  • B..csx
  • C..csp
  • D.both .cs & .csx

23) What is the default value of Boolean Data type?

  • A. 0
  • B.1
  • C.True
  • D.False

24) What is the need for ‘Conversion of data type’ in C#?

  • A. To get desired data
  • B.To store a value of one data type into a variable of another data type
  • C.To prevent situations of runtime error during change or conversion of data type
  • D.None of above

25) Types of ‘Data Conversion’ in C#?

  • A. Explicit Conversion
  • B.Implicit Conversion
  • C.both Explicit & Implicit Conversion
  • D.None of above

26) What are the disadvantages of Explicit Conversion?

  • A. Potentially Unsafe
  • B.Results in loss of data
  • C.Makes program memory heavier
  • D.None of above

27) Which of the following is not an arithmetic operator in C#.NET?

  • A. /
  • B.**
  • C.+
  • D.%

28) How many times can a constructor be called during lifetime of the object?

  • A. Only once.
  • B.As many times as we call it.
  • C.Any number of times before the object is deleted.
  • D.None of above

29) Which of the following assemblies can be stored in Global Assembly Cache?

  • A. Friend Assemblies
  • B.Private Assemblies
  • C.Public Assemblies
  • D.Shared Assemblies

30) Which of the following is the root of the .NET type hierarchy?

  • A. System.Type
  • B.System.Base
  • C.System.Object
  • D.System.Root

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.