Asngnment -06
Degire. nw
dalatupe of a node havirg info ond a
nut pointeh Den tte
Linked tit
joltiaing tunchion"o a angle
a. Afunction that con reolve a mernoy space of
ture NoDE rd returny the bane address of the memory
bpace.
b- prhns all elument ot te inked uot.
C- prmt fnt k elanmto ot te intad nt.
d. prmts odd element, of te inked st.
e. Count the numbeh of elnen o the linkd ot
inesto a reus node ot the firt orhon he
inted it.
tìncucle <Stdio-b
+ includle< tdlib.h
Struet Node
int dataj
Sthrut Node *nent;
int Count e0
Void Doplay AllEleroens (Shut Node h)
while ( hl: NULU)
frot (.d Inyhdata );
h=hnetj
*void Duday- k- Elemens (struct NDde *hjnt k)
int is0;
to (iro, ick; i+)
prmts ("din", h data);
hehneat;
break ;
r vod Diplay Odd (struct Node *h)
int i-0)
while (h NULL)
i} (h-sdak f.2)
priti .d th" hisdata),
h-hnet;
J void Gmunter( Shrut Node h)
while (h] : NUL)
Count +ti
h=hnet;
prnts(otal no.of elementQ in th Solil tdn)Court),
Shruet ode * Inuehttatfnt( shutt Node #h,irt k)
strutt Node *empi
ternp : (tnut Node *) malloc ( hzok (stnut Node)
Femp ’ doa =kj
tunp ’ mest =hj
hettmpi
int main ()
Jrutt Node pq1
p-dola :2;
q data 3;
y.data 90;
strutt Nodr * hnd.
hnd p
prete
q.nat ;
Tntt NUL;
Iriaplay AliGlumcnts (hed D;
Vpents ("Basx addenm= "had),
/int S= !;
vpaplag-k Elurrerta (huad,s);
Ioàlayosa(head);
head =Inwtgt fint (head,j);
Dioplay Al Elmers (head);
rehun 0;