← Quiz: Stack and Queue in C: all 10 questions
Quiz: Stack and Queue in C · Question 10 of 10
What is one advantage of an array stack over a linked-list stack?
What is one advantage of an array stack over a linked-list stack?
- A.No malloc per push and no extra pointer per item, so it is faster and uses less memory per item
- B.It can grow without limit
- C.It never overflows
- D.It follows FIFO order
Answer & explanation
Correct answer: No malloc per push and no extra pointer per item, so it is faster and uses less memory per item
Linked lists grow freely but pay for a next pointer and an allocation for each item.
Can you get the rest right without peeking?
Take the timed Quiz: Stack and Queue in C quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →