-
What is the output of this program?
#include <iostream>
#include <functional>
#include <algorithm>
using namespace std;
int main ()
{
int FirstData[] = {23, 33, 43, 52, 56};
int SecondData[] = {2, 3, 4};
int Res[6];
transform ( FirstData, FirstData + 6, SecondData, Res, divides<int>());
for (int k = 0; k < 5; k++)
{
cout << Res[k] << " ";
}
return 0;
}
-
- 11 11 10 2 1
- 11 10 2 1
- 10 2 1
- 2 1
- 1
Correct Option: A
In this program, We are dividing the first with the second by using function objects.