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

In which area global, external variables are stored?

3 Answers  


Can we compile a program without main() function?

0 Answers  


how to find binary of number?

2 Answers  


we have to use realloc only after malloc or calloc ? or we can use initially with out depending on whether we are using malloc or calloc in our program ?

2 Answers  


how do we remove the printed character in printf statement and write next it it

1 Answers  


Explain the advantages of using macro in c language?

0 Answers  


char p="data"; printf(p);

2 Answers  


What is meant by errors and debugging?

0 Answers  


Why can't we initialise member variable of a strucutre

1 Answers  


What are the different types of storage classes in C?

3 Answers  


how the size of an integer is decided? - is it based on processor or compiler or OS?

19 Answers   HCL, JPR, Microsoft, nvidia,


What is memmove?

1 Answers   Oracle,


Categories