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);

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); Correct Answer 2

In the prototype given, only 2 arguments are mandatory. Since the third argument is default argument, so it is not mandatory to pass the argument.
Bissoy MCQ

Related Questions

Comment on the following 2 C programs.
#include  //Program 1int main(){ int a; int b; int c;}#include  //Program 2int main(){ int a; { int b; } { int c; }}