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

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. The controls available in the tool box of the ______ are used to create the user interface of a web based application.

  • (A) Microsoft visual studio IDE
  • (B) Application window
  • (C) Web forms
  • (D) None of the above

A

Admin • 833.24K Points
Coach

Q. Web Forms consists of a _______ and a _________ .

  • (A) Template, Component
  • (B) CLR, CTS
  • (C) HTML Forms, Web services
  • (D) Windows, desktop

A

Admin • 833.24K Points
Coach

Q. The ______ parentheses that follow _____ indicate that no information is passed to Main().

  • (A) Empty, class
  • (B) Empty, submain
  • (C) Empty, Main
  • (D) Empty, Namespace

A

Admin • 833.24K Points
Coach

Q. The scope of a variable depends on the ____________ and _________.

  • (A) Main method, place of its declaration
  • (B) Type of the variable, console
  • (C) compiler, main
  • (D) Type of the variable, place of its declaration

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 Override 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. How can you prevent inheritance from a class in C#.NET ?

  • (A) Declare the class as shadows.
  • (B) Declare the class as overloads.
  • (C) Declare the class as seal
  • (D) None of these

A

Admin • 833.24K Points
Coach

Q. A class implements two interfaces each containing three methods. The class contains no instance data. Which of the following correctly indicate the size of the object created from this class?

  • (A) 12 bytes
  • (B) 24 bytes
  • (C) 0 byte
  • (D) 8 bytes

A

Admin • 833.24K Points
Coach

Q. Which of the following statements is correct about Interfaces used in C#.NET?

  • (A) All interfaces are derived from an Object class.
  • (B) Interfaces can be inherited.
  • (C) All interfaces are derived from an Object interface.
  • (D) Interfaces can contain only method declaration.

A

Admin • 833.24K Points
Coach

Q. Which of the following statements is correct about an interface used in C#.NET?

  • (A) If a class implements an interface partially, then it should be an abstract class.
  • (B) Class cannot implement an interface partially.
  • (C) An interface can contain static methods.
  • (D) An interface can contain static data.

A

Admin • 833.24K Points
Coach

Q. Which of the following statements is correct about an interface?

  • (A) One interface can be implemented in another interface.
  • (B) An interface can be implemented by multiple classes in the same program.
  • (C) A class that implements an interface can explicitly implement members of that interface.
  • (D) The functions declared in an interface have a body.

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