how to implement stack work as a queue?

Answer Posted / shruti

it can be done using linked list.
create a linked list as a stack..

while displaying
display reverse. :-)

i can write a code for u if u want..

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an array in c?

605


what is uses of .net

1281


show how link list can be used to repersent the following polynomial i) 5x+2

1691


What are local static variables?

629


What is function pointer c?

595






What is a memory leak? How to avoid it?

587


How reliable are floating-point comparisons?

636


How can I recover the file name given an open stream?

559


How would you obtain the current time and difference between two times?

738


What do you mean by Recursion Function?

636


How will you find a duplicate number in a array without negating the nos ?

1658


Differentiate between ordinary variable and pointer in c.

631


What is register variable in c language?

612


Why is sizeof () an operator and not a function?

599


When the macros gets expanded?

802