1.

What is the output of this program?
 #include <iostream> 
#include <functional>
#include <algorithm>
using namespace std;
int main ()
{
int num[] = {-12, -41, -15, -20, -10};
transform ( num, num + 2, num, negate<int>() );
for (int k = 0; k < 5; ++k)
cout << num[k] << " ";
}

A. 12
B. 12 41
C. 12 41 -15
D. 12 41 -15 -20
E. 12 41 -15 -20 -10
Answer» F.


Discussion

No Comment Found

Related MCQs