91. What will be the output of the following C++ code?
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main ()
{
int first[] = {5, 10, 15, 20, 25};
int second[] = {50, 40, 30, 20, 10};
vector<int> v(10);
vector<int> :: iterator it;
sort (first, first + 5);
sort (second, second + 5);
it = set_union (first, first + 5, second, second + 5, v.begin());
cout << int(it - v.begin());
return 0;
}
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main ()
{
int first[] = {5, 10, 15, 20, 25};
int second[] = {50, 40, 30, 20, 10};
vector<int> v(10);
vector<int> :: iterator it;
sort (first, first + 5);
sort (second, second + 5);
it = set_union (first, first + 5, second, second + 5, v.begin());
cout << int(it - v.begin());
return 0;
}
92. What are the Sequence Containers?
93. Which of the following is best to include under try block?
94. How many Associative Containers are provided by C++?
95. How many elements does a floating point number is composed of?
96. What will be the output of the following C++ code?
#include <stdio.h>
#include <stdlib.h>
int main ()
{
int n, m;
n = abs(23);
m = abs(-11);
printf ("%d", n);
printf ("%d", m);
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main ()
{
int n, m;
n = abs(23);
m = abs(-11);
printf ("%d", n);
printf ("%d", m);
return 0;
}
97. What is the Standard Template Library?
98. Which header file is required for manipulation of math functions in c++?
99. What will be the output of the following C++ code?
#include <stdio.h>
#include <math.h>
int main ()
{
double param, result;
param = 5.5;
result = log (param);
printf ("%lf", result );
return 0;
}
#include <stdio.h>
#include <math.h>
int main ()
{
double param, result;
param = 5.5;
result = log (param);
printf ("%lf", result );
return 0;
}
100. Pick out the correct method in the c++ standard library algorithm.
Read More Section(Standard Template Library (STL) in C plus plus)
Each Section contains maximum 100 MCQs question on Standard Template Library (STL) in C plus plus. To get more questions visit other sections.