














Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A portion of C programming code. It includes variable declarations, conditional statements, loops, and function calls. The code appears to define and initialize some variables, perform some input and output operations, and implement some logic based on user input.
What you will learn
Typology: Assignments
1 / 22
This page cannot be seen from the preview
Don't miss anything!
) (^) Uhita fhoplvnm to^ fm^ plenment^ a^ fueue^ u2.Tne
inclvdtLstA0.h 4# inelude LCon'oh
Void Onguene ) voio deg ueue (), viel drp 0; intoin ()
ainE int Ch Prit ("^ \n1.^ fnguuu.^ o^ Inket); h7("nd.Aqant. Delete; h'ndf \hs. DRplay")
whih()
phúnt (^) f(n Entor (^) Choica);
StotchCh)
Cnguut0,
Cosc
CoR dip
Coap A
default: Phientf ("tJhong^ Cloce
Void Ongu tut
PhiedfnDoqua.ud %d',4 fhert) front
Y0d clhp)
if rod= = -T
hd f(" Elenm0ent%..") foniront i<P0 it+)
nt( (^) zel", (^) al (^) i?
A. Exit Crctoh chora
vdth choice:
Unepfbw &t chojce;
EelEnt Choice 20 EntDh Clhoice, Zo WrOng dhoice Cntchoie &nt Eemnt.So
Ene lmut 4d
Wut A^ pro iom^ to^ implomnt^ a^ guuto^ tuing
n t tubing inKdle
#inclulu Zstolio.h #Ineluele Lstdlb.h Stuef node
int infe Sthuuct nocde "pth; pent. raey, tomp, front 1,
void (^) cng (^) int (^) deta); Vejd dog ()0; VDiol ompty
yDicl (^) queut (^) BZ.) ; t Count D
fut (^) no, th, (^2)
Rtntf '1 -nque") Pheintf("h2- Doque") Phtntf(n^ - fruont^ olomout") Print ("A-Pnpfy) fA144 5 Exit frint f^ (Lnt^
Ctete )
Stan f (/d", Sch) Switch (th)
Phntf ('ntPi^ drta:"); Carnf "/hd^ R^ no);
do )
0 t Void Cate )
fiont : 2ten NULL;
Rettwn 4Ue te 3/ ze yeicl Guukize l)
Ptf ("1h Btesa. Biz0 dCout
hgluinq th Void (^) cng (iht^ deta)
1ncah== NOLL)
u (ut^ nodemalloc(7^ 8izL^ f/84aende uh-pth NULl; tre-5info dota front rla
G pt 7emp oelo
.
tCn ptn NDLZ;
Cound 4+
/Dixploying^ the^ guuw.^ olemonti/ id dplaye)
frort I = {rOnd ;
(aa =a^ NUDL))
intfBwu, tz opty'); tun
ohile (fiont^ I^ l^ =eah)
pntfl, feont ->infe);
vdf (d, fund1>inft
/frtos the nt fontelome t t)
e nt!^ NOLL^ J&L^ (reah^ I=NOLL) cton (Pout-infb) olic
Displry if Gtet L enpty oh net/
i (^) Cfont:: (^) NULL. (^) )2& (^) (20as (^) NGLL))
intfeut. nof oty
Ot fut
-ng 2- Pegu
A - Smpty
-9play -BtUo tR 3ize rt 7 Clhof^ ce^1
rt clata 'g Choice
E1dn hoict ftert eleaond 4 nd th clh: et 14 35 8
ta phoflamto^ implon0ed^ a^ citernla
1 inelucle 21dfoh>)
del inc. it quetucex_7,^ /day^
d-loshotitn intfiont =-1; ntee-1, funcfion to^ in&0f*^ an^
olenent tna Cincrdet gtueuce Vicngteeu.(int olemet)
to chehalheu
'elBc if (itoh 1) /-*1exe front)/ tcrdhion to ehich Glus u fl
tutf Bue.^ i^ vve^ flouw-"
ren=2t t1)/^ rmo^ /an^18
inchmtitod
quo un]^ olemenl,^ 1/ersigniing^
a nliu^ to
PokIfOn
t checiGueue
.
Vnid diyloy
int f:frev 1(fronf -:-1 KL ktah --1)
intf C"h Eleneti a Buta ve:); ybile (ic-ro)
int moin)
int Clict. 1, X; //a iadkes clela nttiy
ftindfn fnsh^ nbot^ an^ elemont^ V
Prdfn fon^ :0nphy^
ta slimtnt;
fintf('In^ Ente^ you,^
cloia (^) ")
S d",^ &^ choici); wtch Choice)
to
onf :hd"Rr); ung upus. x);