MCQOPTIONS
Saved Bookmarks
This section includes 2 Mcqs, each offering curated multiple-choice questions to sharpen your C# Questions & Answers Constructor Overloading knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Correct statement about constructor overloading in C# is? |
| A. | Overloaded constructors have the same name as the class |
| B. | Overloaded constructors cannot use optional arguments |
| C. | Overloaded constructors can have different type of number of arguments as well as differ in number of arguments |
| D. | All of the mentioned |
| Answer» D. All of the mentioned | |
| 2. |
When we call a constructor method among different given constructors. We match the suitable constructor by matching the name of constructor first, then the number and then the type of parameters to decide which constructor is to be overloaded. The process is also known as? |
| A. | Method overriding |
| B. | Inheritance |
| C. | Polymorphism |
| D. | Encapsulation |
| Answer» D. Encapsulation | |