Following is a list of function declarations with default values. Which one of them is a valid declaration?
- float mul(float a=5.0, b=10.0);
- float mul(int a, float b=10.0, int c);
- float mul(int a=5, float b);
- float mul(int a, float b=10.0);
Answer:
Option a: float mul(float a=5.0, b=10.0);
Explanation Here
0 Comments