LogiQuest
Back to Functions
1

What will be the output of the program?

#include <iostream>
using namespace std;
int add(int a, int b) { return a + b; }
double add(double a, double b) { return a + b + 0.5; }
int main() {
    cout << add(2, 3) << " " << add(2.0, 3.0) << endl;
    return 0;
}
Medium

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.