--:--









Quiz for Containers map

Course: C++ Language | Subject: Unit 11 | Topic: The Standard Template Library (STL)



Logo

Q1: What does the STL map container store?

Logo

Q2: Which underlying data structure is commonly used by STL map?

Logo

Q3: Can keys in a map be modified directly?

Logo

Q4: Which function inserts a key-value pair into a map?

Logo

Q5: What happens when inserting a key that already exists in a map?

Logo

Q6: How to access the value associated with a key?

Logo

Q7: Which function returns the number of elements in a map?

Logo

Q8: Can you access map elements by index?

Logo

Q9: What is the time complexity of insert and find operations in a map?

Logo

Q10: Which header file must be included to use map?

Logo

Q11: What is the difference between map and unordered_map?

Logo

Q12: What type of iterator does map provide?

Logo

Q13: Which function removes elements from a map?

Logo

Q14: Is the order of elements in a map deterministic?

Logo

Q15: Which container should be used for key-value pairs with sorted keys?

Logo

Q16: Which container allows multiple elements with the same key?

Logo

Q17: Which of these operations invalidates iterators in a map?

Logo

Q18: Which function checks if a key exists in a map?

Logo

Q19: Which of these correctly accesses value for a given key k?

Are you ready to start test? Set your time limit