C#

MCQ questions and answers

  • 4.5/5.0
  • 1k Enrolled
  • All levels
  • Last updated 11/2023
  • English

C# MCQ (62)

1. ______ is the most important component of .NET framework.
A CLS
B CLR
C CTS
D WPF
 

Answer: B

2. Which component of framework is use to manage the memory and exception handling in .NET?
A BCL
B MFC
C CLR
D CTS
 

Answer: C

3. Which code is executed by the CLR?
A Source code
B Binary code
C Managed code
D Unmanaged code
 

Answer: C

4. JIT compiler translate the MSIL code into ____________.
A Binary code
B Native code
C Source code
D Assembly code
 

Answer: B

5. .net framework compiler convert the source code into____________.
A Native code
B Binary code
C Byte code
D MSIL
 

Answer: D

6. Which namespace is the root namespace in the .NET framework?
A System
B System.Object
C System.Data
D System.IO.Stream
 

Answer: A

7. ____________ consists of a set of basic language features which are required by the many applications to communicate with other objects irrespective of the language they ware implemented in .
A CTS
B CLS
C CLR
D FCL
 

Answer: B

8. ____________ specifies certain guideline for declaring and managing type at the runtime in .NET.
A CTS
B BCL
C FCL
D CLR
 

Answer: A

9. What is the base class of all the data types?
A System
B System.Data
C System.Object
D System.IO
 

Answer: C

10. ____________ is the central place for the registering assemblies so that different applications on the computer can use it later on.
A Registry
B Global Assembly Cache(GAC)
C PE
D Assembly
 

Answer: B

11. Which database technology is used to work with data and databases of all type?
A ADODB
B DAO
C ADO.NET
D ADODC
 

Answer: C

12. ____________ based applications are inter operable with any processes which communicate through the Simple Object Access Protocol (SOAP) message.
A WPF
B WCF
C WF
D XML
 

Answer: B

13. ____________is a client software provided by the microsoft company which simplifies and improves the safety of accessing resources and help in sharing the personal information on the internet.
A Windows CardSpace (WCS)
B Windows Communication Foundation
C Windows Presenatation Foundation
D Windows workflow Foundation
 

Answer: A

14. The____________ keyword is use to determines the other source files of the class, interface, struct, or method can be define in the namespace.
A class
B partial
C public
D none
 

Answer: B

15. _________ reference type is use to store the reference instead of data.
A stack
B heap
C RAM
D cache
 

Answer: B

16. A ____________ is almost equivalent to the function pointer in the C or C++.
A delegate
B object Type
C literals
D none
 

Answer: A

17. MSDN stands for
A Microsoft Development Network.
B Microsoft Developer Network.
C Main Developer Network.
D Microsoft Deployment Network.
 

Answer: B

18. Which keyword is use to initialise with an anonymous data type?
A class
B var
C public
D int
 

Answer: B

19. Which reference type is the base type for value and reference and has no literal representation?
A Object
B String
C int
D Double
 

Answer: A

20. Which reference type is use to store the Unicode character in the .NET?
A char
B string
C object
D Array
 

Answer: B

21. ____________ type is a special form of class which is having the property of value type.
A Array
B Pointer
C Struct
D Class
 

Answer: C

22. What is the range of byte data type?
A 0 to 256
B 0 to 255
C 0 to 127
D 0 to 512
 

Answer: B

23. What is the size of unsigned integer type?
A 16 bit
B 8 bit
C 32 bit
D 64 bit
 

Answer: A

24. What is the default value of float?
A 0.00
B 0.0F
C 0.0
D 0.001
 

Answer: B

25. Which keyword is used to define an unsafe context where you are free to use pointer?
A safe
B * pointer
C unsafe
D delegates
 

Answer: C

26. Reference type is stored in____________.
A stack
B RAM
C heap
D secondary memory
 

Answer: C

27. Which operator is a mostly used with the Nullable and reference type?
A ??
B 😕
C
D ==
 

Answer: A

28. Which function is use to convert alphanumeric string into float or integer?
A atof()
B atoi()
C parse()
D both A and B
 

Answer: D

29. ____ operator is use to check compatibility of an object with the given type and it returns a boolean value?
A is
B as
C =
D none
 

Answer: A

30. Which keyword is used to alter the flow of switch statement?
A default
B break
C case
D none
 

Answer: B

31. ____________ continue to execution of the loop for each element of an array or an object collection.
A for
B while
C foreach
D do……..while
 

Answer: C

32. ____________ occurs if the base class exception are thrown by the runtime.
A FormatException
B CoreException
C NullReferenceException
D NotSupportedException
 

Answer: B

33. Which exception class is a used for base class for other exception?
A SystemException
B AccessException
C CoreException
D ArithmaticException
 

Answer: A

34. Which keyword is used to check the memory overflow exceptions?
A Checked
B Unchecked
C Both A and B
D Exception
 

Answer: C

35. ____________ is a wrapper around the one or more structural elements which make them unique.
A Class
B Struct
C Encapsulation
D Namespace
 

Answer: D

36. ___ namespace is contain the classes and interfaces which return an information about types, methods, fields and it also has the ability to dynamically create and invoke the data type?
A System.net
B System.reflection
C System.Data
D System
 

Answer: B

37. The ADO.NET classes can be found in ______
A System.Data
B System.net
C System.IO
D System.web
 

Answer: A

38. ____________ namespace include classes that support to the windows socket interface.
A System.IO
B System.net
C System.net.socket
D System.data
 

Answer: C

39. System.Drawing namespace provides an access to the____________ functionality.
A Text
B Window
C Printing
D GDI+ Graphics
 

Answer: D

40. ODBC stands for?
A Object Database Connectivity
B Open Data Connectivity
C Open Database Connectivity
D Open Data Connection
 

Answer: C

41. ____________ include the classes which is use to define a culture related information.
A System
B System.Data
C System.Globalization
D System.Reflection
 

Answer: C

42. Which keyword is used to hide the important detail in the program?
A abstract
B partial
C interface
D class
 

Answer: A

43. Which is known as the default parameter?
A value
B output
C reference
D none
 

Answer: A

44. Output parameter is declared with ____________ modifer
A In
B Ref
C Out
D As
 

Answer: C

45. Which parameter does not create new memory storage location?
A value
B output
C reference
D B and C
 

Answer: D

46. _______ access modifier gives the access to member of a class without any restrictions?
A internal
B external
C public
D proctected
 

Answer: C

47. A parametric array is an array of parameter and it is declared by using ____________ modifiers?
A Array
B In
C Ref
D Param
 

Answer: D

48. ____________ is called when the object is finally destroyed.
A constructor
B destructor
C delete()
D none
 

Answer: B

49. _____ keyword is associated with the classes which is accessible at compile time?
A const
B final
C readonly
D none
 

Answer: A

50. Static member is belong to ____________.
A class
B object
C function
D datafield
 

Answer: A

51. The ____________ class and its members enable you to access the data and member function of the class without creating an instance of the class.
A partial
B non-static
C static
D public
 

Answer: C

52. ____________ allow you to use the class as an array and enable an object to access the members of a class using an index notation.
A get
B set
C indexes
D enum
 

Answer: C

53. Which keyword is used to declared a class that can not be inherited?
A const
B readOnly
C final
D sealed
 

Answer: D

54. Which operator cannot be overload?
A &&
B sizeof
C ->
D B & C
 

Answer: D

55. Which keyword is use to indicate that class can not be instantiated?
A interface
B abstract
C Both A and B
D sealed
 

Answer: B

56. ______ feature provide an alternative to the multiple inheritance?
A abstract
B class
C interface
D struct
 

Answer: C

57. Which OOPS feature is use to promotes the re-usability of code?
A Polymorphism
B Ineritance
C Dynamic binding
D Encapsulation
 

Answer: B

58. Which operator is called as de-reference operator?
A * (Asterik)
B & (Ampersent)
C == (Double equal)
D ! (Exclamation)
 

Answer: A

59. The pointers can access a member of the structure by using ____________ operator.
A ::(Scope resolution)
B * (Asterik)
C .(period)
D -> (arrow operator)
 

Answer: D

60. Which is a default server root folder of IIS server?
A wwwroot
B root
C public_html
D www
 

Answer: A

61. What is an extension of a resource file?
A .resx
B .resources
C A and B
D .res
 

Answer: C

62. Which folder is used to stores the resources which are accessible to a particular web page in an ASP.NET web application?
A App_LocalResources
B App_webReference
C App_GlobalResources
D App_Data
  Answer: A

Video Lectures of C Language

Icon
Icon
Icon

Subscribe to our Newsletter for Newest Course Updates