Top 50+ Solved C#.NET Programming MCQ Questions Answer

From 16 to 30 of 50

Q. An instance class member is referred by using the format____________.

a. Object name. Class member name.

b. Class name. Class member name.

c. Object name. Class member name or class name. class member name.

d. None of these.

  • a. Object name. Class member name.

Q. Overloaded constructors will have________.

a. Different names

b. Different parameter lists

c. Different return types

d. none of these.

  • b. Different parameter lists

Q. A static constructor_____________.

a. Is executed when the class is loaded.

b. Can be accessed through an object name.

c. Can be executed any number of times.

d. Can have its own destructor.

  • a. Is executed when the class is loaded.

Q. A property________________.

a. Should have a get method.

b. Should have a put method.

c. Should have both get and put methods.

d. Should have either a get method or put metho

  • a. Should have a get method.

Q. An indexer________________.

a. Enables us to access a property through index.

b. Can have user-defined name.

c. Is identified by its name.

d. Cannot be overloade

  • a. Enables us to access a property through index.

Q. A namespace can contain___________.

a. Classes

b. Namespaces

c. Classes and namespaces

d. None of these.

  • a. Classes

Q. The alias should have

a. Improve the readability of the code.

b. Avoid name clashes.

c. Saves you typing out very long strings.

d. All the above.

  • d. All the above.

Q. In the case of a component,

a. Reusability is possible.

b. Code will be in IL format.

c. The extension is dll.

d. All the above.

  • d. All the above.

Q. In case of components and namespaces,

a. Several classes may be present in a component.

b. Classes contained in different source files may be part of same namespace.

c. Classes contained in a source file may be from different namespaces.

d. All the above.

  • c. Classes contained in a source file may be from different namespaces.

Q. In the case of access modifiers___________.

a. Private and protected access modifiers can be specified for a class.

b. Public access modifier can be specified for a class.

c. The scope of the internal access modifier is the namespace.

d. None of these.

  • d. None of these.

Q. The size of integer is___________.

a. 8 bits

b. 16 bits

c. 32 bits

d. 64 bits

  • a. 8 bits

Q. An instance of a value type variable is allocated memory on_______.

a. Stack

b. Heap

c. Both a&b

d. None of these

  • a. Stack

Q. An instance of a reference type variable is allocated memory on_______.

a. Stack

b. Heap

c. Both a&b

d. None of these

  • b. Heap

Q. The size of long is___________.

a. 8 bits

b. 16 bits

c. 32 bits

d. 64 bits

  • d. 64 bits
Subscribe Now

Get All Updates & News