Question 1 of 25
Hints left: 3
Q1
What is the purpose of the 'std::multiset' container in C++ STL?
Q2
What will be the output of the following C++ code? #include <typeinfo> #include <iostream> using namespace std; class shape { public: virtual void myvirtualfunc() const {} }; class mytriangle: public shape { public: virtual void myvirtualfunc() const { }; }; int main() { shape shape_instance; shape &ref_shape = shape_instance; try { mytriangle &ref_mytriangle = dynamic_cast(ref_shape); } catch (bad_cast) { cout << "Caught: bad_cast exception\n"; } return 0; }
Q3
Which algorithm in C++ STL is used to rotate the elements in a range?
Q4
What is the time complexity of removing an element from a priority queue in C++ STL?
Q5
What is the purpose of the 'std::forward_list' container in C++ STL?
Q6
Which algorithm in C++ STL is used to find the intersection of two sorted ranges?
Q7
Which algorithm in C++ STL is used to sort a range of elements using quicksort?
Q8
Which algorithm in C++ STL is used to find the symmetric difference between two sets?
Q9
What is the time complexity of searching for an element in a map in C++ STL?
Q10
Which algorithm in C++ STL is used to compute the sum of elements in a range?
Q11
Which algorithm in C++ STL is used to find the median of a range of elements?
Q12
Which algorithm in C++ STL is used to find the difference between two sorted ranges?
Q13
What is the purpose of the 'std::bitset' container in C++ STL?
Q14
What is the time complexity of removing an element from a list in C++ STL?
Q15
What is the time complexity of searching for an element in an unordered_set in C++ STL?
Q16
Which algorithm in C++ STL is used to find the union of two sorted ranges?
Q17
What is the purpose of the 'std::queue' container adapter in C++ STL?
Q18
What is the purpose of the 'std::unordered_set' container in C++ STL?
Q19
What is the purpose of the 'std::array' container in C++ STL?
Q20
Which algorithm in C++ STL is used to find the last occurrence of a value in a range?
Q21
What is the purpose of the 'std::unordered_multimap' container in C++ STL?
Q22
What will be the output of the following C++ code? #include <stdio.h> #include <math.h> int main () { printf ("%lf\n", fmod (5.3, 2) ); printf ("%lf\n", fmod (18.5, 4.2) ); return 0; }
Q23
What is the purpose of the 'std::stack' container adapter in C++ STL?
Q24
What is the purpose of the 'std::unordered_multiset' container in C++ STL?
Q25
Which algorithm in C++ STL is used to shuffle the elements in a range randomly?