-
What is the output of the following program?
#include
using namespace std;
int calculate(int p, int q)
{
return (p * q);
}
float calculate (float p, float q)
{
return (p / q);
}
int main()
{
int n = 10, m = 3;
float r = 30.0, s = 10.0;
cout << calculate(n, m) <<" ";
cout << calculate (r, s);
return 0;
}
-
- 10 3
- 30.0 10.0
- 30 3
- Compilation Error
- None of these
Correct Option: C
In this program, we are divide and multiply the values.