Explore topic-wise MCQs in Csharp.

This section includes 5 Mcqs, each offering curated multiple-choice questions to sharpen your Csharp knowledge and support exam preparation. Choose a topic below to get started.

1.

Correct way of declaration of object of the following class is ?$

A.
B. name n = new name();
C. n = name();
Answer» D.
2.

The data members of a class by default are ?

A. protected, public
B. private, public
C. private
D. public
Answer» D. public
3.

‚Äö√Ñ√∂‚àö√ë‚àö‚à´A mechanism that binds together code and data in manipulates, and keeps both safe from outside interference and misuse.In short it isolates a particular code and data from all other codes and data. A well-defined interface controls the access to that particular code and data.‚Äö√Ñ√∂‚àö√ë‚àöœ?#

A. Abstraction
B. Polymorphism
C. Inheritance
D. Encapsulation
Answer» B. Polymorphism
4.

Which of following statements about objects in “C#” is correct?$

A. Everything you use in C is an object, including Windows Forms and controls
B. Objects have methods and events that allow them to perform actions
C. All objects created from a class will occupy equal number of bytes in memory
D. All of the mentioned
Answer» D. All of the mentioned
5.

fun(1, 5) will not work correctly

A. s.i = 10 cannot work as i is ‘public’
B. sample.fun(1, 5) will set value as 5 in arr[1].
C. s.fun(1, 5) will work correctly
Answer» C. s.fun(1, 5) will work correctly