-
What is the output of this program?
#include <iostream>
#include <functional>
#include <numeric>
using namespace std;
int Function (int p, int q)
{
return p + 2 * q;
}
struct ClassN
{
int operator()(int p, int q)
{
return p + 3 * q;
}
} object;
int main ()
{
int num = 110;
int Array[] = {12, 25, 53};
cout << accumulate(Array, Array + 3, num);
cout << endl;
}
-
- 110
- 12
- 25
- 53
- 200
Correct Option: E
In this program, We are calculating the product of every number in the given range by using accumulate function.