You are on page 1of 26
VASAVI COLLEGE OF ENGINEERING (AUTONOMOUS) (Affiliated to Osmania University) Hyderabad - 500 031. DEPARTMENT OF : NAME OF THE LABORATORY : Name Aputu Roshan Roll No, '602-20- 233-094 Page No. “WAIT O phog uM to implement CRC Hechnique SOURCE CODE alent Hindude estdio:- hz Hinuudec statioh7 Hin uude< staingh> HtEInuude IntLuge PFE ouude c aspajinde-h> er" <%¢ Cenas ¥inpust>) wot 14, eylen, msg, nod input CW, PoyC30), RmpL3il ,qudt Cas], Som Lai, 2g C20; prints(enrea dato), gets Linpub), Print FLY EMI Key: ”), gers (keys); KOylen = Sten (KOH), 105g One stI20 Cinpus), sirepy (Keyl, Key), FmLi=0; re keylen i++ c inpukCosgienti J =°0, fia Cizo; \ereylen; 44) 5 5 templid= inpurti; FOLIO; | ernsglen; 1+4) £ QuotCiT= empleo), se | FeALi=0; 1< keylen; i+) E KeyEsI= Key Li], mh LiKe ; jr0;)-D & ipCtOmpli? == reyes) owe rem Ci-J = ‘01 » 3 demby-J=* 1; embeeylen-iJ= input Litkeylen),. 3 Sttpy (temp, 92m), VASAVI COLLEGE OF ENGINEERING (auTonomous) (Affiliated to Osmania University) Hyderabad - 500 031. DEPARTMENT OF : NAME OF THE LABORATORY : Name _Apudu koshan Roll No. 1602-20 -333-09% Page No. 3 Strcpy (Sem, emp), PrIntFC’ nQuokient is *), $o C=O, re msglen; 144) print F(- 9% c%, quor iI; paintH Remainder is °); FoR Cis0; TeKeyen-I, i++? printel %o% HOMEID; prints (* tn Final dota is>*), FACI=O; Ferns gion, 14+) E paint $e%cr, puri), inpursto + +J= inp, Forci=0, ic Koylen~; 144) E printf (> %cr, HEMI), Borne ple %er, Semein), impurstaLjt+] = Aem Ci]: giruce soveoddh_in s@vo_odde, dient_odds, Cos leusFen Cro24t; Soucen_t oddH_SiZe; oo GA = covet (AF set, Sour pimAM, °) rytsoutds OE CTsocek 0m”), exits), . . a>). nomsel( fsir0r odd, S27 EMOAA8 7 er am poot + Arons (port). . = eh. sio_odd9.s add inek_addn (ip), SO ard, (athuce soucoddOdsea07 pddS, Seor(senvor add): nebit DE. (FOV aoa (“CT bind orAom), exit( VASAVI COLLEGE OF ENGINEERING (AUTONOMOUS) (Affiliated to Osmania University) Hyderabad - 500 031. DEPARTMENT OF NAME OF THE LABORATORY : Name _ Ajit Roshan Roll No, 1602-20933 074 Page No. kegchro/ buff, 102); = gigeop(uient.adala, Hecuppom(soue fd, busler roe, 0, CStAUCE socteaddn ddl printy(“ceTpaka Hecu> %s\n", buffeA, BzH0C wouFfer, 1024), HC CruF Fe), Serdbo(Soursd, bupfeh, 1024, 0, (struck soucaddn™) &-vient_add, s3¢0F Caient_odd”))- PrinrE( > Cerparn cons %5 \w’ b ufsQn), Unoh pusfend Coz, bgOAD ( busFedt, 1024), : addSs\ze= 5\, en y | onan 0, (st rule covkadd5r®) vient adds, £add4.5932)- priot¢(” C+ para FRom Hecv = YS \Y, DUPfAnd, 13090 buffer 1024; ~) ups, “ wdliome Fo +h@ UDP seaven") ee enel tony, 0, GstPUtr sockaddr) ftindvdeestdlib-h> D | atinclnde rincludecsys| ty pesn= -tincludec netinek fie-h? -tinulude - %s*, inpux); VASAVI COLLEGE OF ENGINEERING (AUTONOMOUS) (Affiliated to Osmania University) Hyderabad - 500 031. DEPARTMENT OF NAME OF THE LABORATORY : Name _ Apu eoshan rot No {602-20 ae Page No. J0n(i =0; Te keylen 4) € pempLid= inpurlid; Fumio; jeensglen; i++) quetLiJ= tempCol, iF (quot Ci] = ='o') £ fone 0, jckeylenat) Fey CjI°0! ; bse J foalieo; j VASAVI COLLEGE OF ENGINEERING AUTONOMOUS (Affiliated to Osmania University) Hyderabad - 500 031. DEPARTMENT OF NAME OF THE LABORATORY : Name; __4pu%u Roshan Roll No. 12°7"22-722-08) page Ho, Pre tabe 4: List vetriovs delays in computey OChoumks Ans: Diffehent delays in vompurA NehuOAKs ane ~ 4. TAOS mission delay Q. Paopaganion delay 3-Queneing delay A "PH Dressing Jey 2- whak is GelaKon berween eFfiuendy, Propagation delay and 4Aansmiss\00 delay im stopend wait protocol oe = whee M1 is efpeuenuy Us os TE 1S tPONsMisspn FUOHg oe Tp is prpagahon delay. GIs the espidenly pas rv be atieast 50% ,then what is PelOhON lberween +aansmission and propogaion delay JAns- Efpdenvy formula: y= He Ter p Here, ma weCve) oe 2 7e2IP 7 fy and seleckve epeak prorniis right -HOM missed Frame, a Are Tes = ae only Me wrAupred frame is pifferenkare 0 Boue foes an ToRALE 1, al the frames Gorpansmirted: Za satetive repent, as us wm, qeemiven Window size Ist and 19 seleun ve epeak au Meceiven window S3eare ime and QreaKea than 4, “Ln onorea both sender an a VASAVI COLLEGE OF ENGINEERING (AUTONOMOUS) (Affiliated to Osmania University) Hyderabad - 500 031. DEPARTMENT OF 7 NAME OF THE LABORATORY : Name _Apuau Roshan Roll No, _'602-20-733-094 Page No. Law 6 tAmplementakion oF HO-BACE N prdtucol Using sockek prrngaomming SOURCE CODE : cient aHinuudecstdioh> [ttintlud@ teInLLude< noenekfin: 07 include , ener add: poopy (Ccnasseve> odd», (Chao*D4s@ print Frvnsending nequest to the dient: \n’), Fondo (uli@risouddk, v HI TAM CENT”, Igeof CHT LAM CLE “), Of struck soucaddn*)45ervadda , S1Ze0F (SeveraddAD) intel" Musodting fom eply: WY, ee efsentsoxe Srey, BOF (AE) 0,CSt AU sockaddr*)Eservenaddn en). print (“nents the window sige: (2, paints Un sending the ae sige-W"), swan ene sode eh, (cnawdLwindowsizge, 512004 (Window Size),0, (stAulk souca sed eoadd, S00} OUCH): J 3 asl); SOW 2g Crhosthyname(» 12%-0:0-1"); sesoldor sin ohddrs odd, sig @opCs@w08hedfod, VASAVI COLLEGE OF ENGINEERING (AUTONOMOUS) (Affiliated to Osmania University) Hyderabad - 500 031. DEPARTMENT OF NAME OF THE LABORATORY Name “PUI Roshan Roll No, '602-20-933-071 page No. PRIME! NWalting for HE SOVAA Hesponse- 0), ‘Aecusm~ mCuientsodedk, (ChOA*) & toroupaucers, sizeoF (fotalpackOls), 0, cstPuck soucaddn) 4senveraddh , £1 en) PROEF("\n ME Wt park AGE = \b %d [n*, horalpacKars”) Sendo (uigntsouke, “RECEIVER 7 Size0p (W RECEIVED"), 0, (struce soucadda*) PsOveraddA, sizeor Gerveraddny). srecusprom( chientsodeeh Loman) 4toraugnames, sizeof Crotmframet) 0, Cst Aue soveaddhr)4seavodds, 517 eof CCAM PANEFC MStasrhing tHe PACES of Aeceiving *>, jc Yor) por) Se ie ntaantcusing the Aeceive buffer. \nr), Y atts wme expered Frame is %d with pauls”, Framer recived’), ete window 2 ££ ic totalpaucoks) wey Sint#(-tnn Wtting for 12 frame. \0°), easjAom(euientsockee, (chon D4F1,S'zeoF (1), 0, Cst Puck sockaddr D4 serv.en odds, 41€n) Aint F(“InPeceived prame %din EnreH -1 ro send Neqovive acknowledgment fon ae he fotlowing packek \M-, Framer Received, 4-0; L=bu fer, nie jewindowsige 4£ L< toraspaucets) PepAntEC \n poUkOe » Men, "el pocretCi), scanf( %d", Facknowledgm ent adenowledg elt), jF(oUenow 1edg ment. olenowledg ery] = =~) € igle==0 gee : Lat, ares receiv ed-++; ene Cuionbeowok, Conan‘ 4acknow elgment, Siz eofovenow\edgemone) °, i" (StU sockeaddO™ MseHueIaddG, SiRF sesuonadtn)), Swe : int Cy WAU FAaMeS HEceived succor partyin Cl c " Brintg(-\OAN sane fully) 08ing conn eckon witin SeUEN-\n"), VASAVI COLLEGE OF ENGINEERING (AUToNomoUS) (Affiliated to Osmania University) Hyderabad - 500 031. DEPARTMENT OF 7 NAME OF THE LABORATORY : Name Apudu Roshan Rott Wo, 1002°20-233-094 Page No. SEV include FRieludecs ys! soceek-h> indude< Sys/hypes hr ‘indude the FAaMe\w), Mere eames oes X)4FAL, SIZe0FFD, 0, Cs¥ute sovcad™) esevencdds Sten), printf(“Ineeceived srame Yd \NEnrer | to send negarive auknow fedgement for the following pauls \n, Framesmeceived); 570, Fe while (i lstin dude € int ssd,lFd, len, i=0, J stans; Uno st C20), srame [20] empl: StduLE SoLKAdAHin Sadd9, adder, IF (cs§d = sockOr(AF- TVET, SOU_STREAM, D)) ==" POAoH(’ souceel) CARA), B30 gs0dd sig 005 (sada), saddn-sin_ family = AF at a a = Pitpns (124 le), so Sin iia. ¢ add = ntond( IPAPDR-AMY), We ig(leind (std, (struck “spueaddr™) £20d d%, sigeor(saddx))20) POorromr|* bine OHH08"); iF (sten C554, Bae s Siz COL ord cd Coauee svoxaddon* )&caddn, 12) prints(~ Enten the Fexk Ven), sean F (“a sv, st); while izstaten(st®) & momset( Frame, 0, 20), stNcpYL S9ame, sti, SIZE) prints * Transmitting FRames) gen= stalen (same), FAC§=0; 1 1EN; J++ £ prints(“%d *, i+3) Sprinke-(lemp, ea" in); a. StacatCemame, temp, Deitel 5d, Fame ,siz€0s (JAame); mead CLF aut, 20); av], ove l20], ‘sScanf (atk, “%d", #stokusd; VASAVI COLLEGE OF ENGINEERING AUTONOMOUS (Affiliated to Osmania University) Hyderabad - 500 031. DEPARTMENT OF NAME OF THE LABORATORY : Name: _Apuru Soshar ig(stalus==-19 paimts(-WTAAngmission Suess”), 1602 20-933-0% Roll No.2? 20-1222" page No. Fe paint (evn Received emA0m in VE Yd \n", StDUS), Print 5.(- Retransmitting Snames”), FoaLiz0 74> & Frameciz= sta Lrstaus]; a) att; i+( C F+stahus) %4 ==OD 3 breOk; Print} (” 0°), Frame LsI= '\O', Ben = stolen ( sAame), Forlj=0, § [giindude by include £ int 25d, 554,120, choice; chan sealed], ennCer] ; AMC. sack 9d A4.in Saddh, cody VASAVI COLLEGE OF ENGINEERING AUTONOMOUS (Affiliated to Osmania University) - 500 031. NAME OF THE LABORATORY ; ————_______ Apudu Roshan Roll No, 1602-207 ?3£°2 page No. isC Cs§d> soukOk( AF_INET, Sock_STREAM, 0D) = =~!) PEMMON [vsockel) EM0a~), geo Chsaddr, sigeoF-(sadd%), saddd-sin_samily= AF TET, sada. sin_powt > hrons (1244), wonneck 55d, (sure soceadan FAL Ii? © Head (sfd, StH, 20>, ig(1 stemp sta, exit*)) E paint F(- Ww Exiting“) brea Sines ce necewed St Scan (~ Yd" ,Fr0iCe), iF(tunoic@) ‘ Eeaa wy, ger VY), *)£saude, sizens(sadda)), ms wont to nepomt an exon 2Lrylo-n)-1 Sts), Ne~) Be pninky(” Enter 50g no os Srame whene eh has occured ae scans“ %s, A); cyRite@( 55d, CF, S1OHCOM)- aead(s 5a, #, 207; ee pacts inreccived transmitted sname © %s 3 Jose (558), setuan 0; 3 ootPUT Ont SHOE a eneaor the tert Roshan Geceived- Ros012 want to BAO a” eovors " Ole tty [o- taansmitting sHames| a ae a enter seg no oy FHAmE whi Received 5 ane nce ee HE geceved tnansmitted frame is hdsi29 123 Frans ee Received aren) qeceived: han3¥Swant ty ACpoAE an Rersansentting Fancy eraont (1-4 10-24 er 509 10 OF Shame Whee Gor eS ocwned = has LO received transmitted joame is hani23 VASAVI COLLEGE OF ENGINEERING (AUTONOMOUS) (Affiliated to Osmania University) Hyderabad - 500 031. DEPARTMENT OF NAME OF THE LABORATORY : Name Apusu fashan Roll No, _1602:20- 133-C1¢ Page No. Pela window paotdeol using so Many wits fur sequene numbers tha 1. Imaging a sliding UraApP odound Ace oceans: WhAE qHelAKENS must hold among me fow ewindow edges and the window sige euhidn Is wonstant ‘and the sam@ for woth the sender and the Heceives: ? Ans. sav Sendens tour edge 52 Senders uppe edge Rt: Recowens lower edge 2: Receivers upper edge w: windowsye p conditions that must hold among fous window edges and the There age msee mai window size Tne sone musk Kaep thave of O1DW FAIMes thak NAVE CUDAENhy HEL? sere bu have 0 acknowledgment ie ourstanding: Oa=$2-sttl <=W a The oecoiven will expete upto w FAME eo- Rit = w 3: the qecelver's Saquane numa must be within the sendoxs window Sez RI Zs2t! a-me dlistane Faom enath a distant planet is AppAximaxly 4 the = cnanndl uplizaton iF a slop ‘cand woit protocol is used for Frame sGansmissioN O7 a EUMbpS point-to-point link 2 Assume hat Hye ‘Faame size is B2EB and ne speed of light is 3 4¢ CS) nls. seid 10) Mm “howe Solr distance = Qx10" = Bandwidth = 6H Miss Frame Sige = 32 KB velocity = 3% 1 misee t= PAamesige = a2¥ 102 ¥8 = 0-004 SEC Gardwidth — ue 108 p= vengtn _ gril _ 300800 yeoury BES 7 Te 00m 5 2 = 664K 10" 16li guKON = > ——_ Coe a y+21p — Goo+ e004 © —-GOO-DDH Wcations of distance Veta algorithm and link stay® Prouti 3s “and eons OF eath of -mnemz "3 3-wnor ane the xing algorithm ee — aagoaithms - wna the pm Ans: Applcaons oF distance veuwn AO) 4 ARPANVET 2 RP: 5 state Houring aAganithn ake — wicanons oF Hn rer open shoantes pain Hast tosPeD 2 anremediar® System f0 Inrexmediate System (as- 45) VASAVI COLLEGE OF ENGINEERING (Affiliated {6 Osmania University) Hyderabad 500031 DEPARTMENT OF NAME OF THE LABORATORY : Name Apunu Roshan Roll No, _'602-20- 333-094 Page No. Advantages of Distance vedor Routing algorithm — Deis easy to implement - 2 TMS ProtoOw! has VEY Vimiked Sedundanuy $7 smal nenvoAkK - Disadvantages of Pistante Veuwh Pouring AUgomithm — The prowem win distance yedwh Houring algorithm y's its slowness in Convahging 10 commett OnswE-"Ms & Ue TO O ‘problem called wunt fo infiniry FOBLEM- Anotheh problem s tha Bis algorithm does not take ‘me line bandwidth into lonsideronon when choosing the Aoot + Advantages of tink stare ouring algonithey is— Fost NonDOmK Conweeqen(e- Zt iS+he main adwantage of link seYe Pouring protocal Because oF ReCeluing aN LSP, link-Stake outing Protocols immediarety flood the zsP out of an interfaces withouk any Changes except jor the Inteyace jaorn which the LsP was seceived- Disadvantages of Linke sta® frouring algosithm is — Memory requirement - the link stare Aoung pAOtoLOL cmeale ard maintains & dokakase and SPF Taee- The datdhase and SPF tHGe aequisied mone memory +nan a distance veced paoteol: = A nehwor7 on +h InkeONet hos a subnek mosie maximum —Numbor OF hosts ib can rendiee IE OF 285-255:2H0-0 «who te Ans: supnek mask: 255: 285° 240.0 45 hepresent —Nehwork So, we can Configure 21% hosts in O Chuo k- Fast and Last ae USCdl for special purposes - VASAVI COLLEGE OF ENGINEERING (Affiliated fo Osmania University) Hyderabad - 500 031. DEPARTMENT OF NAME OF THE LABORATORY : Name Apwau Roshan Roll No, !602-20-233-09%" page No. cawt Lumpla aj esta 's i plement yne dijistAa’s shortest path %ouhing algoaithm SOORCE Cope: . 2 #inude Moaudes limits-n7 Fdesine v4 int minpistance Cint GistC7, bool sprSekCI) E int mins awit mar, min_inder, foo Cint v= 0; ve Vi V4 Eig Goptsoe cv = = sase 44 distCvJ<= mia) mnin = distCW) min_inder =v; 3 Dekwan min inden 3 Void painesoturion(int disk JE paints (-Veniex Ve ve oo $00 gorCint 120, 1 3 8 i VASAVI COLLEGE OF ENGINEERING (AUTONOMOUS) (Affiliated to Osmania University) bad - 500 031. DEPARTMENT OF : NAME OF THE LABORATORY Name _Apuru Roshan Roll No, 1602 -20-9.8-094 Page No. “Tapiement Bellman— Ford Algorithm SovRCE wre SF nclude € Seatl ope pied (SBULE GPaph®) mallne (Sigeof(st rue Crraph?), ghaph ~>V=V; se. 6 Teele: cataver Edge’) mastoc( graph>€ ¥ Sigeosstwucr Edge), fey cee Soe ste, eo) i Soluxon Lint distZI, int 0: | Kee mint c nveanx \EDickance fO0m Source Vertex); vot 1, : . Cicvsiens +40 Fiat tod We NE VAN Hy BILD; 3 Zoid Bellman Fond (stuck (aph* graph, it source) Sint Ve ghaphovy int E=graph3&, int signe Distance lv), int 9; ae (i20; i LVLMAX; Zrpnepistance Csource}=0; Fo (it; Teaver; 1D OC520; 3 etlge LiI-source , int v = ghaph—> edgeciT-destination; int weight = graph edge cid weight, if (stAepistunce CuI + weight < Somepistance Lv) 3 shepistane DvJ= shxeDistonte Dalr weg, VASAVI COLLEGE OF ENGINEERING (AUTO (affiliated {0 Osmania University) Hyderabad - 500 031. DEPARTMENT OF ; NAME OF THE LABORATORY : Name Apu Roshan f0n (120; 12 E sit) & jot u = graph edge Lid SOURCE ; iat ve graph edge Li] -destinavion, ink woignts graph edge Lid weight, ag (shore pistoncela}+ weignt < SroreDistane! w)) $ PRatf “this graph contains neqanve edge wyue\n), 3 Ziras Sotuton( stpepistance 2 3 Meno, Tot ment) § i ogc Ente numben OF verkices in graph \W'); 96d, BV) . Ses, 7 mbon of edger In ghaphin'), sean, ("6d 4 FE), ° prints (eo youd source VeneK number \n’); ‘seang (” %od ", &) exoutk opragh® ghOph= caearetrraph(v, ©; int) SoALi=0; been exige York propenhes Soud&, desinouivn, weight sespeck vely, Felt ceb &gaapn 9 osgeDI 90.8 ©), yD scans (° 968", graph 7 2490" eee ; cag Md, AGH n> edgecs weignt), Botiaman ford | ap h/E), onan 0+ Roll No, _1602-20-233-074, Page No. i tlie Ov7po7: EAI “numior veances In gph Ere) number op edger gap to Ene, yous Seunce veatex number © Eni eige + f*pesnes sources, deskinakon, weighs grespechvely 1016 Ente, edger propeakes sousces, GEsknakon, We'ghE gespeunvely : 0 29 Ent exe 3 Propennes -So8xes, dlestinevion, weignt aerpertvdsy > | ae EM eige 4 propGies Sovs(e, clestinon'on, Weight Hespethvely :! 4 —ly Ener edges pryperes source, deshinaion, waignt Hespedively: | > S EnI® eage 6 prOpESHES souMre, deskin cor, woight Hespedivaly +3 | 2 Enter edge > prapeHnes, souhce, desnnation, weight especky dy : 7 3-3 Enter edges properhes, Source, destinakon, usignt Hepeurvely: 2 4 4 Enh edge @ propeakes, SHOE, dastinahion, weight *specnvely + D> ENB 0dg0 10 propeares, su5Ke, destination, weignt, Mepeckvely » 4+ SF eater Distan@ Fom Spur veniex 00 12 aay 34 42 VASAVI COLLEGE OF ENGINEERING 7 (AUTONOMOUS) (Affiliated to Osmania University) Hyderabad - 500 031. DEPARTMENT OF : NAME OF THE LABORATORY : Name “uu Roshan Roll No, _'002-20-733-094 page No. d-umplement ceaky Butkek Problem SOURCE CODE FFindude int mained fink Lea =O; int psige , billed OU ACHE ; 7 prinby Bete, umber of paged s:*), ScOnf(* Fed", . : pean pourets in the orden of thely adAivas Hme Wr y FRCi=0; Len, 1+ | Z prints C “eaten the Hoe and 13e> yo ) Stang ("%d” %d", £pciz, +me, &pi- sige), prinbF(-EMIRA buckek SiZe-7 seang(*%d", 4esiz®); . phintf(“entes +e ourpwr Gare). scan (°%od", SOuxAwe), n= prn-l] ime; Vi 0; bpued =o. meee =m Il bpited {« 0) - ET painte(e AW At He %0*i); if (pEeT- He Gerad bpilled £2 ake Hed = bplled+ pleT- sized, 7 : Pint sewn od bye packer is insonted-% POMT 932), F=K4; ee print F(“In%od byle poorer tc aiscaaded + poEIS3e), ESky 2 ip (filled ==) 5 prints” bse if Cesiled r=ourabe) Dyed = bfilled -ourfoue,; pamtstrin %d bye baangened~, owkAWE);~ Antwo paeers I tGonsmitred) wan VASAVI COLLEGE OF ENGINEERING ____ (AUTONOMOUS) (Affiliated to Osmania University) Hyderabad - 500 031 DEPARTMENT OF : NAME OF THE LABORATORY : Name *putu Roshan Roll No, '602-20-732-C44 page no. ese £ paint f (“in Yod yres thansjeaed % b filled). bpiled =O. INES“ \POTKERD IAMtHENUKEE~Yod by it~, BAN EAH. anon ° 2 printecrmPocress in the wuucer God bye PHN): 3 s menano, z eee oO OF pouets: 3 Enr@> the oun OF pa . ‘ Enter powers im the oPder they ane asprived Enter © sme and sige: | 100 Eni the time and size: 2 40° ENA the time and sige? & 600 Enreh the LutkQl- sige> S00 Erie the oulpuk Hale? 200 At time 1 : too bye paueee 1s inseared. 100 Byes taainsyenned . Pouce in the buckdr 0 by'e At time 2. yoo Pyres potkOk iS inser Boo nyjes rarsjeaned e Po yn the buurk 200 by rime 3 feo bytes pausee = siscorded Dyes EAN) ; 200 SE re bore © fe VASAVI COLLEGE OF ENGINEERING (autonomous) (Affiliated to Osmania University) Hyderabad - 500 031. DEPARTMENT OF NAME OF THE LABORATORY Name “Pudu Roshan Roll No, '902720-933-09y Page No. 4: Implement pif i@ Hellman algorithm using Sotkor pAogAaMmin g SOURCE CODE: Seavere sHindude -ictlude Hinududecgtring-h> seincludec unistash> inuude int powt Cint a, int BD int valye=1; for ing Lebj 144) & value*=0; in VOLKE 5 3 - mae ay, gex, a, value nt) ned, comp hem; prints’ Ent the value for a 3°; scans ( * Zod” &0); value = powt (9,0), value= value %P; temp-value, wring Cemp7) gOm= temp %l0; bupp6n-1J= teaanynom; 2B emp = templio; a Kauet soucadda-in sohveodder, dioddoy, int sotk Fd, newsocesa, Ci -adahten,; ‘suc fd =SOCKEE(AF. VET, SOLES TREAM) 0); if Cs0ur§d<0) ¢ printf (“SoRET ERED’) ROMAN ~1; : cor0( cchasrt)4s@rv-04d%, sigeo¢ (2% v.ad09)) , + " AF UVE1, Bre Se eior addr nyonl20RD0#. ANY, + sil t= hhons (8088). So ee arate soteadda )Rseruaddn, s\ze0¢(sowaddn))uce sockaddn*)ui.ada%, & i_odda.ten), send (newsouera, bufFL,N/0), hod buss2[ HO; A=9ECU CneuUsoekese], DUFF2- 40% value =0; int t= nite cien) £ (ease = volug10 +Uint) bu fF2Li J, itt; Values powi(value a), value= value % 0; paints (“the Key is fod value), QOhen O° -s¢ioclude estdio-h> -intudecstallilo > #pndude inuudeesys [ rypes-h? stinclude includecompa (ine h> Hincudecst Ang h> Hn ude int pow2(int 0,1nt &) § int (=0, value=z, j20; i Cenaa) 9em; temp=kemp [10, ne) Sour souradd in sOh.0dd% ioe sovkfals ‘Sousa = cocker ARIVET, SOLE STREAM, 0) bg@ro(.cchad ¥) 4 s@rvaddm, Sigeop(seav.od0) ily = ARIVET, ATRL ddl (1142-168- 198-124") s@rv.adda-sin adda. s_adda= indk. Yservads, sizeoy (serv oddr))<0) S@rv.oddH. sin__port = hlons( 8088); ipCconneck(soursd, (StAUCE soueaddr = phinty{- Connection Egon Y 3 HENAN ~ Ui 2048], ae 7 0dd8. AE 2 Sige of (cemw.0dd%) jak n2 = Sec Csouesd, bu fF2, 440/°) send isoceed, bur Fl, ly 0), neny value=0: int I es Pe eMlo+ Centoapp Be (int) busy 2017; volme= valu Me Zaye =powt (vaUe,a) voue= value % P/ pAintfeme. Key IS Yod 2 vole); erion 9, quente aoe eee Eni the value for &: # Enter the value for ar 6 ene Key is 4 ane Key is 24

You might also like