InterviewSolution
Saved Bookmarks
| 1. |
Which among the following can be used in place of default constructor?(a) constructorName(int x, int y=0)(b) constructorName(int x=0, int y=0)(c) constructorName(int x=0, int y)(d) constructorName(int x, int y)I got this question by my school principal while I was bunking the class.This intriguing question originated from Constructors Overloading topic in section Default Arguments vs Overloading, Upcasting and Downcasting of Object Oriented Programming |
|
Answer» The CORRECT answer is (B) CONSTRUCTORNAME(int x=0, int y=0) |
|