Question OOP-POLY-0010
MediumWhat is the output of this code?
#include <iostream>
using namespace std;
int add(int a, int b) { return a + b; }
double add(double a, double b) { return a + b; }
int main() {
cout << add(2, 3) << " " << add(2.5, 5.0);
return 0;
}
- A.
7.5 5
- B.
5 7.5
- C.
Sign up free to see the answer and a step-by-step explanation.