adplus-dvertising
frame-decoration

Question

What is the output of this program?
    #include 
    using namespace std;
    int operate (int a, int b)
    {
        return (a * b);
    }
    float operate (float a, float b)
    {
        return (a / b);
    }
    int main ()
    {
        int x = 5, y = 2;
        float n = 5.0, m = 2.0;
        cout << operate (x, y);
        cout << operate (n, m);
        return 0;
    }

a.

119

b.

102.5

c.

123.4

d.

none of the mentioned

Answer: (b).102.5

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?