Question
1.
#include
2.
using namespace std;
3.
int operate (int a, int b)
4.
{
5.
return (a * b);
6.
}
7.
float operate (float a, float b)
8.
{
9.
return (a / b);
10.
}
11.
int main()
12.
{
13.
int x = 5, y = 2;
14.
float n = 5.0, m = 2.0;
15.
cout
What is the output of the following program?
1.
#include
2.
using namespace std;
3.
int operate (int a, int b)
4.
{
5.
return (a * b);
6.
}
7.
float operate (float a, float b)
8.
{
9.
return (a / b);
10.
}
11.
int main()
12.
{
13.
int x = 5, y = 2;
14.
float n = 5.0, m = 2.0;
15.
cout
Answer: Option D
Was this answer helpful ?
In this program, we are divide and multiply the values.
Output:
$ g++ over3.cpp
$ a.out
10 2.5
Was this answer helpful ?
Submit Solution