1.

What is the output of this program?
#include <iostream>
#include <functional>
#include <numeric>
using namespace std;
int Accumulator (int n, int m)
{
return n - m;
}
int Product (int n, int m)
{
return n + m;
}
int main ()
{
int p = 150;
int Array1[] = {12, 22, 33};
int Array2[] = {11, 12, 13};
cout << inner_product(Array1, Array1 + 3, Array2, p ,Accumulator,
Product);
cout << endl;
return 0;
}

A. 150
B. 12
C. 22
D. 33
E. 47
Answer» F.


Discussion

No Comment Found

Related MCQs