Standard Template Library (STL) – MCQs

30 Score: 0 Attempted: 0/30 Subscribe
1. : What does STL in C++ stand for?





2. : Which of the following is not a type of STL container?





3. : What is the main advantage of using STL?





4. : Which container stores elements in a linear fashion?





5. : Which container allows duplicate elements?





6. : Which associative container stores key-value pairs?





7. : Which of the following is not an STL algorithm?





8. : Which container adapter gives LIFO behavior?





9. : Which header file includes STL components?

11. : What does the iterator do in STL?





12. : Which of these containers maintains a sorted order by default?





13. : Which adapter container uses two ends for insertion and deletion?





14. : What does begin() function return in STL containers?





15. : What does end() function return?





16. : Which container uses key-value pairs and does not allow duplicate keys?





17. : Which container allows random access to elements?





18. : What type of container is priority_queue?





19. : Which algorithm is used to arrange elements in ascending order?





20. : Which function removes all elements from a container?





21. : Which container does not allow duplicate values?





22. : What is the use of count() function in STL?





23. : What is the time complexity of accessing an element in vector by index?





24. : Which container is best for fast search, insert, and delete operations?





25. : Which algorithm finds the maximum element?





26. : Which container supports insertion/removal at both ends efficiently?





27. : What does unique() do in STL?





28. : In STL, what is emplace_back() used for?





29. : What type of iterator is used with set?





30. : Which container allows reverse iteration?





Leave a Comment

All copyrights Reserved by MCQsAnswers.com - Powered By T4Tutorials