C# (C Sharp) MCQs with answers Page - 36

Here, you will find a collection of MCQ questions on C# (C Sharp). Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833.24K Points
Coach

Q. Which of the following jobs are done by Common Language Runtime?
1. It provides core services such as memory management, thread management, and remoting.
2. It enforces strict type safety.
3. It provides Code Access Security.
4. It provides Garbage Collection Services.

  • (A) Only 1 and 2
  • (B) Only 3 and 4
  • (C) Only 1, 3 and 4
  • (D) All of the above

A

Admin • 833.24K Points
Coach

Q. Which of the following statements are correct about a .NET Assembly?
1. It is the smallest deployable unit.
2. Each assembly has only one entry point - Main(), WinMain() or DLLMain().
3. An assembly can be a Shared assembly or a Private assembly.
4. An assembly can contain only code and data.
5. An assembly is always in the form of an EXE file.

  • (A) 1,2,3
  • (B) 2,4,5
  • (C) 1,3,5
  • (D) 1,2

A

Admin • 833.24K Points
Coach

Q. Which of the following statements are correct about JIT?
1. JIT compiler compiles instructions into machine code at run time.
2. The code compiler by the JIT compiler runs under CLR.
3. The instructions compiled by JIT compilers are written in native code.
4. The instructions compiled by JIT compilers are written in Intermediate Language (IL) code.
5. The method is JIT compiled even if it is not called

  • (A) 1, 2, 3
  • (B) 2,4
  • (C) 3,4,5
  • (D) 1,2

A

Admin • 833.24K Points
Coach

Q. Which of the following are parts of the .NET Framework?
1. The Common Language Runtime (CLR)
2. The Framework Class Libraries (FCL)
3. Microsoft Published Web Services
4. Applications deployed on IIS
5. Mobile Applications

  • (A) Only 1, 2, 3
  • (B) Only 1, 2
  • (C) Only 1, 2, 4
  • (D) Only 4,5

A

Admin • 833.24K Points
Coach

Q. _________ are reserved, and cannot be used as identifiers.

  • (A) Keywords
  • (B) literal
  • (C) variables
  • (D) Identifiers

A

Admin • 833.24K Points
Coach

Q. The character pair?: is an________________available in C#.

  • (A) Unary operator
  • (B) Ternary operator
  • (C) Decision operator
  • (D) Functional operator

A

Admin • 833.24K Points
Coach

Q. A _____ is any valid C# variable ending with a colon.

  • (A) goto
  • (B) Label
  • (C) Logical
  • (D) Bitwise

A

Admin • 833.24K Points
Coach

Q. Which of the following statements is correct about constructors?

  • (A) If we provide a one-argument constructor then the compiler still provides a zeroargument constructor.
  • (B) Overloaded constructors have the same name as the class name
  • (C) Overloaded constructors cannot use optional arguments.
  • (D) If we do not provide a constructor, then the compiler provides a zero-argument constructor.

A

Admin • 833.24K Points
Coach

Q. Which of the following can be facilitated by the Inheritance mechanism?
1. Use the existing functionality of base class.
2. Overrride the existing functionality of base class.
3. Implement new functionality in the derived class.
4. Implement polymorphic behaviour.
5. Implement containership.

  • (A) 1,2,3
  • (B) 3,4
  • (C) 2,4,5
  • (D) 3,5

A

Admin • 833.24K Points
Coach

Q. Which one of the following statements is correct?

  • (A) Array elements can be of integer type only.
  • (B) The rank of an Array is the total number of elements it can contain.
  • (C) The length of an Array is the number of dimensions in the Array.
  • (D) The default value of numeric array elements is zero.

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ