1.

What will be the output of following code :#include <iostream>using namespace std;#define x 5/2.0#define y 3/2.0// Function 1int add(float a, float b){cout << "Function 1";return a + b;}// Function 2int add(double a, double b){cout << "Function 2";return a + b;}// Function 3int add(int a, int b){cout << "Function 3";return a + b;}// Driver Functionint main() {cout << add(x, y) << endl;return 0;}(A) Function 2 4(B) Function 3 4(C) Function 1 4(D) None of these

Answer»


Discussion

No Comment Found

Related InterviewSolutions