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

What is the value of y in the following code? x=7;y=0; if(x=6) y=7; else y=1;

12 Answers   TCS,


cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration

0 Answers  


IS STRUCTURES CAN BE USED WITHIN AN ARRAY?

7 Answers   Caritor,


What are header files and what are its uses in C programming?

0 Answers  


Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff

0 Answers  






What is the output of the program #include<stdio.h> #include<conio.h> void main() {0 int i,j=20; clrscr(); for(i=1;i<3;i++) { printf("%d,",i); continue; printf("%d",j); break; } getch(); }

4 Answers   CTS, Oracle,


C program to find frequency of each character in a text file?

6 Answers  


what is a non volatile key word in c language?

1 Answers  


what is the significance of static storage class specifier?

0 Answers  


wats the diference btwen constant pointer and pointer to a constant.pls give examples.

9 Answers  


In CMM or CMMI certified organizations,we assess only the standard software processes of the organization. We do not assess the organizations other functional departments like HR or Admin. Then how can we certify the entire organization as CMM level company?? We have assessed only software related activities. Right. There is no relation with other departments like Accounts, HR or Admin. Then how can we claim that the whole company is a CMM certified company?

1 Answers   Melstar,


What is formal argument?

0 Answers  


Categories