Page 1 of 1

What will be the output of the following C++ code snippet?

Posted: Wed Jul 13, 2022 7:50 pm
by answerhappygod
#include <iostream> 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) <<"\t"; cout << operate (n, m); return 0; }
a) 10.0 5
b) 10 2.5
c) 10.0 5.0
d) 5.0 2.5