Home > Marketing Management 101 > Quizzes > C++ Programming Practice Test: Class Hierarchies, Library & Containers in C++
C++ Programming Practice Test: Class Hierarchies, Library & Containers in C++
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 86% Most missed: “To which of the following access specifiers are applicable?”
C++ Quiz on on different aspects of a container which includes creation and design of new containers, vectors and sequences, types of inheritance and various class hierarchies, sequences like seq_con array class, seq_con vector class, stl – pair and heap, vtable, vptr, generators, array type manipulations, tuples, complex library, valarray, bitset and class relationships. Class Hierarchies: A class hierarchy in C++ is a structure where classes are organized in a tree-like manner, with a base class at the top and derived classes below it. The derived classes inherit the properties and methods... Show more
C++ Programming Practice Test: Class Hierarchies, Library & Containers in C++
Time left 00:00
25 Questions

1. What is a virtual function in C++?
2. C++ is ______________
3. What is the use of fill() function in array class?
4. What is random_device?
5. Which function is used to insert an element into heap?
6. In how many different ways any-container can be constructed?
7. Which are not full container classes in c++?
8. What is the use of front() function in heap?
9. How many vector container properties are there in c++?
10. What type of access does deque and vector provide?
11. Which of the following is correct about bitset and vector of bools?
12. Which access specifier is used where one wants data members to be accessed by other classes but not from outside objects?
13. What does the cerr represent?
14. How access specifiers in Class helps in Abstraction?
15. What will be the output of the following C++ code?
#include
#include
#include
using namespace std;
int main ()
{
string mystring;
bitset<4> mybits;
mybits.set();
mystring = mybits.to_string,
allocator >();
cout << mystring << endl;
return 0;
}
16. How many items are there in sequence container?
17. What are the vectors?
18. What is meant by multiple inheritance?
19. What is vptr?
20. Which of the following is correct about extent() function?
21. What is the syntax of printing the first element of an array Arr using get() function?
22. Which of the following shows multiple inheritances?
23. What is mandatory for designing a new container?
24. Pick the correct statement.
25. What is the Run-Time Type Information?