Q. What is the output of the following C++ code?
Code:
#include <iostream>
using namespace std;
int sum(int a, int b, int c)
{
return a + b;
}
double sum(double a, double b, double c)
{
return a + b;
}
int main()
{
cout << sum(1, 2);
cout << sum(1.5, 2.5);
return 0;
}
β
Correct Answer: (A)
Compilation error