← Back to Question List
C++ Quiz #15
Function Overloading
What is the output of this code?
📄 Code
1#include <iostream>2using namespace std;34int add(int a, int b) {5 return a + b;6}78double add(double a, double b) {9 return a + b;10}1112int main() {13 cout << add(3, 4) << endl;14 cout << add(1.5, 2.5) << endl;15 return 0;16}