← All topics
Quiz: Stack and Queue in C: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. Which order does a stack follow?
- Q2. What does this print? (code)
- Q3. In an array stack with top starting at -1 and size MAX, when is the stack full?
- Q4. What is underflow?
- Q5. In a circular queue of size 5, rear is 4. Where does the next enqueue go (if not full)?
- Q6. Why does a linked-list push take struct node top?
- Q7. What does this print? (code)
- Q8. Which string is NOT balanced?
- Q9. What is the main problem with a plain (non-circular) array queue?
- Q10. What is one advantage of an array stack over a linked-list stack?