Q1.
Given the overloaded functions:
int max(int a, int b);
double max (double a, double b);
What will be the output of the following code ? (Assume no syntax errors)
double val = 6.8;
double result = max(2,3, val);
- (1) Calls int max (int, int)
- (2) Calls double max (double, double)
- (3) Compilation error due to ambiguity
- (4) 9.1
- (5) Question not attempted