Punya chhetri
Punya chhetri

Reputation: 1

stack related question in microprocessor

can we also do queue operations in microprocessor? (given that the microprocessor supports stack operations )

Upvotes: 0

Views: 417

Answers (2)

TheCodeArtist
TheCodeArtist

Reputation: 22477

Have stack, want Queue??...


You can always implement queues in software. Refer this Q for more:

For a detailed discussion on how to implement a queue using stacks:

GoodLUCK!!

Upvotes: 0

Carl Smotricz
Carl Smotricz

Reputation: 67750

No. The stack is built in insofar as there's a register and operations to support it. There is no similar support for a queue.

If you want a queue, you need to implement it in code.

Upvotes: 2

Related Questions