-
What is the output of this program?
#include <iostream>
#include <algorithm>
#include <vector>
#include <utility>
using namespace std;
bool mypredicate (int k, int L)
{
return (k == L);
}
int main ()
{
vector<int> num;
for (int k = 1; k < 6; k++)
num.push_back (k * 101);
int Array[] = {101, 202, 303, 404, 2022};
pair<vector<int> :: iterator, int*> Pair;
Pair = mismatch (num.begin(), num.end(), Array);
cout << *Pair.first<<'\n';
cout << *Pair.second << '\n';
++Pair.first; ++Pair.second;
return 0;
}
-
- 505
2022 - 101
202 - 404
303 - 2022
505 - None of these
- 505
Correct Option: A
In this program, We are finding the elements which are mismatching in both the variables.