1.

What is the output of this program?
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main ()
{
int num[] = { 12, 25, 39 ,42 };
int * ptr;
ptr = find (num, num + 4, 42);
--ptr;
cout << *ptr << ' n';
return 0;
}

A. 12
B. 25
C. 39
D. 42
E. Compilation Error
Answer» D. 42


Discussion

No Comment Found

Related MCQs