Professional Documents
Culture Documents
Lab Questions
Lab Questions
#inelude Itdio.h
#inelude rollib»h»
Voio push U}
Voiol pop t
Joidl displaylJ;
Stvet node
Rint Vol;
8truet node next,
aye 1:
push t)
reals
reale
ase 3
dsplayt
regk
3
dofaulk:
printt" please entor Yalid ohoice ";
oid pushu
int val;
Struet node phr stnueh nodosJ nalloe (sire of
Shructnode));
Cphr NUu)
Print rot able fo push he elenent;
plse
prbtf"Pnbar the Nalue ";
deont dj4 val);
head = Null
phr-yol Vol;
phr-nert NlJLL;
lead-p;
PlSe
Phr->VolVal;
pfr nert- head;
Pad phr;
prott t tor puhad";
leid popl
ot iten;
8truct ovde t ptr;
theacd =: NUILJ
priott thderflos");
else
ern .
head-> Valte;
ptr = head;
head= head-> nexF;
freel ptd;
print"atem pepped"
outpub
ohoose One from the beloo eptions.
pUsh
2 poP
3 Sho
4 Bxit
Ener your ohate
Tte pushed
ohoose one from He boloo optrons
push
Pop
4 Cxit
Pnher your choite
iterm popp ed
2 lite a propra io to pertorn tulelk Sort
sing ray
+inelude c8taioh)
oi d quiek gort (int number fs, int firsth. lat last)
nt main
in i, bunt, number as);
Ore u qping to enter?:
PrinttHo many elemeoks
dount d Count)
printt"Enter 1.d elPmPnts", (but
Js
fer li-0; ie lbust; i++)
&tonftd 4 numor ti3);
9uieksort loumber, g (bunt-1);
printt" raler of Jorked elemenks:";
or lis0; 1 Count;itt)
Printf .d', number ));
return 0
ulput
Ho many elemenks are u qolht o enker ?: 10
Fntr 10 elemens: 23
61
13
45
19
39
So
32
12
41
prder o drted elements: 19 23 32 39 41 4S so
67 72 78