Game Guides > Game FAQ >  

Give at least 5 real life examples where you use stack operations

Give at least 5 real life examples where you use stack operations
Real life examples where stacks are used:-

a) Processing of procedure calls and their termination.
b) In a recursive call of a function.

c) When a person wear bangles the last bangle worn is the first one to be removed and the first bangle would be the last to be removed. This follows last in first out (LIFO) principle of stack.

d) In a stack of plates, once can take out the plate from top or can keep plate at the top. The plate that was placed first would be the last to take out. This follows the LIFO principle of stack.

e)Batteries in the flashlight :- You cant remove the second battery unless you remove the last in. So the battery that was put in first would be the last one to take out. This follows the LIFO principle of stack.

f) Cars in a garage :- In order to take out the car that was parked first you need to take out the car that was parked last. So the car that was parked first would be the last to take out. This follows the LIFO principle of stack.

g) Clothes in the trunk

h) CD's in the case



UJJWAL SAHARSA NIIT