Answer explained
Differentiate between stack and queue.
Both are linear structures, but:
• A stack is LIFO; a queue is FIFO.
• Stack insertion PUSH and deletion POP occur at the same end, TOP. Queue insertion ENQUEUE occurs at REAR and deletion DEQUEUE at FRONT.
• Only the stack top is directly exposed; a queue removes from front and adds at rear.
• Stack uses include call stacks, undo and expression evaluation; queue uses include scheduling, printer buffers and BFS.
If A, B, C are inserted, a stack removes C first while a queue removes A first.