Question
Prototype: className(int x, int y, int z=0);
a.
1
b.
2
c.
3
d.
Compile time error
Posted under Object Oriented Programming
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. How many parameters must be passed if only the following prototype is given to a constructor? Prototype: className(int x, int y, int z=0);
Similar Questions
Discover Related MCQs
Q. If the constructors are overloaded by using the default arguments, which problem may arise?
View solution
Q. Which among the following is true ?
View solution
Q. Which constructor among the following will be called if a call is made like className(5,’a’);?
View solution
Q. Which constructor definition will produce a compile time error?
View solution
Q. If there is a constructor with all the default arguments and arguments are not passed then _________________
View solution
Q. Which is the correct statement for default constructors?
View solution
Q. Which is a good alternative instead of having one zero argument constructor and one single argument constructor with default argument?
View solution
Q. What is upcasting?
View solution
Q. Which among the following is true for upcasting in inheritance?
View solution
Q. Which among the following is safe?
View solution
Q. Which among the following is best situation to use upcasting?
View solution
Q. Which property is shown most when upcasting is used?
View solution
Q. Upcasting and downcasting objects is same as casting primitive types.
View solution
Q. If multiple inheritance is implemented, which upcasting will be correct?
View solution
Q. If class C inherits class B and class B inherits class A ________________
View solution
Q. Upcasting is _____________________ without an explicit type cast.
View solution
Q. Which concept is needed because of implicit type casting use?
View solution
Q. When are the pointer types known for upcasting the objects?
View solution
Q. When are the object type known for upcasting the objects?
View solution
Q. If two classes are defined “Parent” and “Child” then which is the correct type upcast syntax in C++?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Object Oriented Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!