1.

What is the output of this program?
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
bool IsOdd (int k)
{
return ((k % 2) == 1);
}
int main ()
{
vector<int> num;
num.push_back(110);
num.push_back(45);
num.push_back(85);
num.push_back(101);
vector<int> :: iterator Iter = find_if (num.begin(),
num.end(), IsOdd);
cout << *Iter << ' n';
return 0;
}

A. 110
B. 85
C. 101
D. 45
E. None of these
Answer» E. None of these


Discussion

No Comment Found

Related MCQs