mplementation of stack using any programing language



mplementation of stack using any programing language..

Answer / aravind

1. stack as an array or linked list (two ways)
2.define array.
3.perform push operation by taking one more array.
4.perform pop and store the popped items
5.display function to print the popped values
6.make sure you reach LIFO

Is This Answer Correct ?    3 Yes 3 No

Post New Answer

More C Interview Questions

What would happen to X in this expression: X += 15; (assuming the value of X is 5)

0 Answers  


Which is the best sort method for library management?

1 Answers   Microsoft,


How to write a C program to determine the smallest among three nos using conditional operator?

2 Answers   Google,


What is define directive?

0 Answers  


Define function pointers?

1 Answers  


what is the purpose of the following code, and is there any problem with the code? void fn(long* p1, long* p2) { register int x = *p1; register int y = *p2; x ^= y; y ^= x; x ^= y; *p1 = x; *p2 = y; }

1 Answers   Google,


Why void main is used in c?

0 Answers  


What is conio h in c?

0 Answers  


Evaluate the following: int fn(int v) { if(v==1 || v==0) return 1; if(v%2==0) return fn(v/2)+2; else return fn(v-1)+3; } for fn(7); 1) 10 2) 11 3) 1

6 Answers  


What is scope of variable in c?

0 Answers  


What is meant by global static? why we have to use static variable instead of Global variable

4 Answers   L&T,


what would be the output of the following program? main() { int k = 123; char *ptr; ptr = &k; printf("%d",*ptr); }

4 Answers  


Categories