Senior .Net Developer Question:
Download Questions PDF

What is the difference between a stack and a queue?

Answer:

This .NET interview question tests candidates’ basic knowledge of collections. Along with stacks and queues in this category are hash tables, bags, dictionaries and lists. A stack keeps track of what is executing and contains stored value types to be accessed and processed as LIFO (Last-In, First-Out), with elements inserted and deleted from the top end.

A queue, on the other hand, lists items on a FIFO (First-In, First-Out) basis in terms of both insertion and deletion, with items inserted from the rear end and deleted from the front end of the queue.

Download Senior .Net Developer Interview Questions And Answers PDF

Previous QuestionNext Question
What is implement a generic action in WebAPI?Do you know what are three common acronyms used in .NET, and what do they stand for?