how to implement stack work as a queue?

Answers were Sorted based on User's Feedback



how to implement stack work as a queue?..

Answer / kisna

by using two pointers

Is This Answer Correct ?    5 Yes 2 No

how to implement stack work as a queue?..

Answer / 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

More C Interview Questions

explain what are pointers?

0 Answers  


what is the use of call back function in c?tell me with example

2 Answers   Bosch,


what is c?

4 Answers   IBM, TCS,


Is it possible to have a function as a parameter in another function?

0 Answers  


What is structure pointer in c?

0 Answers  






What is static memory allocation?

0 Answers  


Explain 'far' and 'near' pointers in c.

0 Answers  


multiple of 9 without useing +,* oprator

3 Answers  


 write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare.  You will then tabulate this information in another file.

0 Answers  


what is the difference between postfix and prefix unary increment operators?

3 Answers  


What are the two forms of #include directive?

0 Answers   Aspire, Infogain,


What does %p mean?

0 Answers  


Categories