--:--









Quiz for Containers stack

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



Logo

Q1: What type of data structure is a stack?

Logo

Q2: Which STL container is typically used to implement a stack?

Logo

Q3: Which function is used to add an element to the top of the stack?

Logo

Q4: Which function removes the top element from the stack?

Logo

Q5: How to access the top element of a stack without removing it?

Logo

Q6: What does the empty() function return?

Logo

Q7: What is the time complexity of push and pop operations in stack?

Logo

Q8: Which header file must be included to use stack in STL?

Logo

Q9: Can you iterate over elements of a stack directly?

Logo

Q10: Is stack a container or a container adapter?

Logo

Q11: Which underlying container is NOT allowed by default in STL stack?

Logo

Q12: How do you check if a stack is empty?

Logo

Q13: Which of the following is NOT a stack operation?

Logo

Q14: Can stack be used to reverse elements?

Logo

Q15: What will happen if pop() is called on an empty stack?

Logo

Q16: Which container adapter does STL stack resemble?

Logo

Q17: What is the default underlying container for STL stack?

Logo

Q18: Can you access elements other than the top element in a stack?

Logo

Q19: Which of these functions does NOT modify the stack?

Are you ready to start test? Set your time limit