Professional Documents
Culture Documents
0.nha Ae Applicas Osiacks? Explain: Om Push and Pop Opexdtion Ih Stalk
0.nha Ae Applicas Osiacks? Explain: Om Push and Pop Opexdtion Ih Stalk
DATE
i Catkatking
DacKtadeKin9 IS a recursive algodthm which is Used
ndudStdi0.h>
tonint muJtiplyNumberyfnt h)
nt main)
int h;
Poind Ent4r a Po i tive integ ed, "
Sanlool",n)_ multPlyumbosss(h)_
Painti"Factovial of %u", n
etun 0;
Function Ca
progrdmming, whtnevyer you mdke a cqi rom
Ont ution to tht anotherunttion. The dddyetf of
tht Caning unction 9eS S}ored in the Stalk
Push
TOP
uNari
POP
PAGE NO.
oATE
) S t ing AeveTsel.
S i n TAVAYsalu is anothr amdz|nt
aPPlicaion 0_Stdtk, Hert on by on e each chayatter
the StaCk 9 in serttal into tht Stdtk.
So, the irst cha>dtHr o tht Stauk Oh the
boHom 0f the Statk dnd tht 1dt thdratt of
Hht String ii on the top Gthe Stdtk
AHY_peYfyming the pop OpAratton in StdLK,
We_gef he Sint in_tv{rit drdR3
idde <Stdio.h>
indude Stzing.h
e i n e max 100
int top Stack Lmax];
Noid Push(char x)
PushInseot-ing Elkment ih
Statk)OPezdtion
ltopE Max-1)
inHC*sta tk overftow),
else
Stack[tttop]=x;_
void pop)
1/ pop CRemovint eltment from Stack)
Pointo", Stack[iapJ)
hain)
char Str[]"si ldhka
int 1en Stylens)
int i;
or(i=0:i«jen:it1)
PushlstoCÍ);
or(1-0;1zlen;i+)
POPL)