← All topics
Quiz: STL Containers: questions with answers
9 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. Which container keeps keys in sorted order?
- Q2. What does this print? (code)
- Q3. By default, priorityqueue<int gives the:
- Q4. What does this print? (code)
- Q5. What does this print? (code)
- Q6. Which container should you use for "undo" in a text editor, where the last action is undone first?
- Q7. What does this print? (code)
- Q8. What is a pair<string, int most often used for?
- Q9. Inserting at the front of a large vector with v.insert(v.begin(), x) is slow. Why?