0% found this document useful (0 votes)
62 views

Assignment For Sem 2

Uploaded by

Ritesh Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
62 views

Assignment For Sem 2

Uploaded by

Ritesh Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 27
Assignment of “Data Structure & Algorithm" cum "Operating System" AN ASSIGNMENT SUBMITTED IN PARTIAL — FULFILMENT OF THE REQUIREMENT FOR THE AWARD OF THE DEGREE OF BACHELOR OF SCIENCE (COMPUTER APPLICATION) BY RITESH KUMAR GOP - DSPMU2020002225 Exam Roll No, - 208512286 DEPARTMENT OF COMPUTER APPLICATION & INFORMATION TECHNOLOGY Or. SHVAMA PRASAD MUKHERJEE UNIVERSITY MORABADI,RANCH!-834008 (2021) DECLARATION CERTIFICATE This Is to certify that the work presented in the Assignment in partial fulfilment of the requirement for the award of degree of Bachelor of Science In Computer Application, of Department of CA & IT, Ranchi college Ranchi, is an authentic work carried out under my supervision, To the best of my knowledge, the content of this Assignment does not Form a basis for the award of any previous Degree to anyone else, Prof. Jaffar Abbas & Prof, Ranjay Kumar Date: 06/12/2021 Deptt of CA & IT, OSPMU Ranchi CERTIFICATE OF APPROVAL The foregoings assignment entitled, is hereby approved as a creditable study of topic and has been presented in a satisfactory manner to warrant its acceptance as prerequisite to the degree for which it was submitted. It Is understood that by this approval, the undersigned do not necessarily endorse any conclusion drawn or opinion expressed therein, but approve the assignment for the purpose for which it Is submitted, (internal Examiner) (External Examiner) + @ubble Soot | =H fncude stk Pncludle |__seld hubblesort C int act, Jnr-n) og Got, j. temp 3 _forC4z0; fxny jee) £ for Cjso; j ate) £ | temp = aldI} I atgi= afsesys | QC j+1] = -temp 5 \ aoe | _vecd majn ¢) [+ aloo), K 5 Tn, porg C"\n_enpey the mp. Ah elements:"); Nejoq", am) 5 ca fos CK=0; Kem; K++) oi a i pataef Care) =", kK): staal “ Ww aes i _t scam C"\ aod Balk) Fe 4 | bunbtecort Ca mi; pafmet C" 2 _The _sopted etements axe + es dow CK=03 Kem; K+t) 3 pats C"\n sed ", afk); gepeh 0; fifi fff | Wate ro aera i a Qe Selection Sort ee SE fntude emis eee areata oe void aya pag ge eI MEME £ : oop, j,termmp > Gen ieon fener £ _ foo (j= f113 dens st+) £ LY Calzy afi) — £ temp = a[F33 a@rfi= eri) alij = temp’, 4 2 f b vot mayne) . for octet), Ko) papa" \n Enter tie no: 6 elements"); Seema Coe)", Gare) fos Ck20; Kem KH) é points Capa’, K); gery ("ed", walk); age to Sk Page No. “_gelectionseot Ca» ee / Pmpf C"\ar The _ egoute danni oy A f Sher Cxe0 Kerns eet) oie oe ge =p Cn Sod") Af); ct [getchens ~ | 3 = vu iz __& Insertion Sovt oe te fmctude wectcito. > th Prelude “conto. h> oo Pneewtionsort Chop att, fot nm) a fori, temp 5 tow CH= 45 fens S++) 4 step = atfli Caz f-15, d>=0 8h txatdi; d--) afdrj= atst$ aCdeiy = temp, —| 3 5 “J Date__/___/. void maj) L Ureses 0 5 stmt kK, temp, afasJ, ms \, cr ey want -fe sort |"); rit.2 Cuyn_Hao noany_cfements fot SE gemf- Cad, Bmp fos (Keo, Kem); KH) \ £ 1. podaif Ce [yds KIS cscanfe C°YeA" , ACKI); 4 quichseat Caym,o, m-1)5 U forks 0} Kem e414) printf C'\n ed", alk I) getchtds i m Mexge Soot binolucde Ksittoeh> 4h Poolude < conior h> fmp atrsts void mexge Cnt Sb, finfamicf frm ub) £ Pop 4, dk, blest forCiz tbs j= midges us ob; femid ate J goubs Kit) roe [ ble sar eke SEE _bleI= al sid 5 while C4'< = mud) blK+tJ= ACgt4zs while Cd'X= Ub) Feces blkatJ=a Citd5 fee Ck: 2b ; K<-ub; Kit) ake Je b OKI - i Petit [oct mmergesone CPt. 2a popu) Pap mid, wr ; en saat £ aad = Cei+e) /2 cmengesort C1, emecl ) 7 mmergesort Crt ¢ 44); cmenge C1, mich, u)) t | LV \ \ VA AA AA AN & vot majin() i yep kot, mm! Asses) 5 : prietf C"\n Hoo many elements yuu wart te sort"), Sort scomfe C'fod", Qin) ff ff port Ct atuays sk pac Man ae 4 foe eee eee smengesant COs 7-1); cHLGnre tenn sfor Ciezo; Kem 5 Ket) 7 pointe C"\n ted") 20d §deichoe g [ 6. Binary Search tt Pretudo +H Protudo «conto. h> Secret —— Jingo aci, Sn, “er otorment) ! gop 4, Joc=0, beg, ends: conics , flog <0} ie = deg =D; fee eae saueiea sees eee Chd]e ni, eee while Cebege= ered) ftacoterment !=atmit})) L aru mil = cbeg 4 end) : eave Hg Celement == 0 Prt] ) ces fo a a iy - Joc = mid 5 oo _ 7 LAV \\ vA - Date — /—/. else iF Cetement <2. [mics ) SSS end = md-13 elne beg = mid +14, % Ty Ching = =1) 3 panty C"\n seanch success ped") | paintt C"\n position oh element *focl= Yo" element loc+1 )> g else port C"\n Reanch ‘iu _unsuacerspef"')) _yotd analinc) 4 mr afer), jim; clrsost)5 polnt{ CW nter no- a, elements”) scant Cited", Ben) foo Cs=0 5 dem; yt+) 4 pring Cateedy=", 5): coanf C8 4fe\", bafsI)) ¥ irAt C’\ Ghter the element” which you ont to geanch’)} ——|__seamn} C" efod", REY, 1 een toes eancht 2) m, KY get) a) For do tees ks flag £05 point fC" \n @niet =the cement yor mt seach de scons C'Med", gy. Fr forded) yan; en) - fe eeucaeeca | apCpeges1) = f lL pring "on Seach we Success hut 5 ebe “patos C'\n Search is lunduceosst") | = aie wae sre () | a a Pot aC wo, Fm 5 i etsscn(); L petrreC” Onter tre Roh Glementy’ *); 1 =a pate /—_/. ee scemp Cd", gum) oe |_ — Jed, Fam J++) _ pring Ca [eped) "40 5 _scamg Cod", Ra CHG): 3 Limess{pearch (a ym)? |____Jakch.0) 5 | \\ A — 4 4 — ___ $+ Insestion & deletion oc, clemert dn an gooey FE frclucte Zercko-h> dt imebice tt Prabide 4stdtibshs ft wotd dmsent Cor ati, fn eize, Pot p, Grt clement ) 4 gorC d= gfee-n 5 fo= p-t5 ji-) : a a[frij=e(iJ; g aes] = element 5 _ spe +45 ——| - —t detest ia point C"\m ced", ais ai © Page No. [—] oe ae aye Date ; a a — vel eterimc Pt a ald. = “give, art £) : 4 = oo iiss de Cpa feaie=t ted — : ata sat SH2< -- gor Cleo: cia bk es Patt Cop set at I$ $e ce a ce = amajn () SS £ - — — as Pnt_o[s0] mJ, nm) num , poss eee te clwsen() _ a = poruy(''\n Gniew the oie of am annoy), deamy ("Ajeal", far) eee eee | ae grt) — s gairig Cro bea =", 4) - AeanfeC "Med", fea ldI); j HEC" \n 1 Inseo "J; : pete C" \n 2 olelete'’): moh (ma) oe a I — foo" seyret Renee a | 7 Aertes —the- 251: itt ~ fn yoo : Seam$ ('%d", apes): ce | sfrsent (asm, pes smu)! z —F a oT bets a a Coe! JrPntf C"\n_ Entes -the Position tere yeu @ant -te — t delete qn element"); Scam C"fod", & pos); | ______deletion Gam, pes 9) break! 43 yy ‘N oO! 13 \A\V\AAN | Wxite a Preqoam to ppes}erm push and pop epesation A stack - : HPinctucle tt Tmetudo |_| te| dnt _stack [ico], choice, top, %, 4} void push Cvotd) 5 vetd pep (pep) simp majo) & Hops -1 5 potintg- C" @rtes the gre oh stark [Mex=iooJ’ = gomnf Cited", wn)’ printf C"\\e 4. pest nit Qe POP wert SaB%) \n\t 8 Exit) | do —| L ee point C"\n enter the Choice! "); ssetes scant ("4led", fs choice.) 5 _proPrig C"\n\z ExIT Point"); break} | dear | , 4 ; PoPrtf-C "WE Please enter a vatid ahmiee Gle|s)"): + 3 wshile Cchoe != 3); Stefurn D5 4 ver pushy | ¢ | (40p >= n-a) i [ PrPrtgC'\\E stack as Overton)” i! v co & 7 Z prirtt-C” Entes a value to be pushed |"): | Sang C"*bd" | Bx) | op +45 ar Stack (4op] = x; aI & | t — dT . fees uh Jy Cope: -1) —~T Lt oe print} C'W\t stack umes fled")p 3 else £ print}(C"\n\t “The popped element & ed", stack [top 3 )j top--} 3 3 — —L — I page No. [~) Date — 1 nite a program tp pat 3 ncn ttn a queue ees Lat degine max so ——$— Voie) Pcers C3 = void olelete C)j et nr queue axcay CH ex) Pmt __seeay = 1 Pint _fyront = 1} cid mane) £ dng choice _! chile c1) g __priint# ("41+ Test element -to quene\"); printf "2. Delete element grorm quoue \n'),' eee ia een Pet Ete IeE Ett panes Center your choice: "); sseemp- ("A4acl"" , 85 choice}; sartch Cchoice) coset! Tres O; break}, Cue 2: eletetet); byeak ) \ ee i ae a cae 4! ee aac eee rg exit (D5 sleet Peta c Wroee choice \n"'); a oS : voit} Drees) cs : _Pry_add. item ; ff Cayo = = Max 4) Tntf (* Quawe Ov \n"): EEE Rent ono to ty Cfoent =~ -1) _-frent =8 ; ___ print C' Thies =A element in queue! ote ee Scant ("Yd") eaolel ikem ); _ pean = hearst 5 co amay (>a) = add: ttern; 5 : void olelete C) 4 Sy C foont == -4 I front > naar) oe print C" Qusue Unolerfloe \n"); | pefunn 0; t a. a] elve pe ’ p a Seater] tp S Cr ejemment aletetedt from quanto Te! tel nt, que anny £4001) front» foot fh — — + 7 : WL = x< \ \ |__ fo _vofindlewss usexz. QOS commands ase case fue» ag i * isthe asxea pho we gteve cup 3 tnt - tien ov data , amd collection oh gxoup ot LAVA A |_ five Commenty used) Snterno) QOS Commands + 4. @ATE 7 ____ie__comrnand it used) _.to_clie play the __ | « Sa a : | pate OT ; SS | Ci \ > date — sr [Tre ewwent date i Sun 05|32)2023| > + [erie the neva cafe: date /t {IL al Sun_o5/12.]9021 —_l Ci\> tH + Th yeu type Dare —seftheup pascam etaich then, Pn__ld-mm=yy _foumak. tf you want +0 keep —— =the game dae _ PATE command wth /T aefich dolls the _ eemmand MO__yust eurpuf ~the cso mate, without paompiiing por a men tee __& TIME — st 7 | The syntax. is: TINE LIT 1 4fme] . iT T C:\> Hime T Br The wssent apm Js 13:41 53.99 Sntey the new +tfime 3 Cima fe af J OFF yo | iyo pry | ee 7 rn Gaathi) 2 | = Gaathi) dame ag DATE cemmarnd typing Time wien mo A “T]__patamepess clfeploys the cusweent\ afne and 4 a. __evempt bey a mem ene. pres, enter -to__heep ‘the same me. Time a used with /T cwfich tert, _~the Conn __qust—Sutpet the _aworenr _pyptem tims, without __paempting hero. 1 e2@ -Hfime “g_ TYPE - _—This__command _is__usee|_-to_atplay “the _centente | a tear file or files. =e The Ayntax__ is: TYPE Cdofvey Lpath) frlename Now (ele fey do display the cmnbents ob tho chile mamed_~_-bflename “we have _Cxeated easeblor _ o LL i\\i\\\ using copy con’ command - + _Ci\> copy con pélename copy con Command &_used to cueake a pile Pn _-the enlisting ——______}— diimectesy £0__hexe _coethe _exeatirg ———)——_— a file_name filename Js C. duyve 7B_cave._omnd exit type FO. which Te gonna do neo %2 1 1 file capieds | { ni [a ets [it 5_usteat_te cleak the «wesxeen . /O | syntax ia + ors CI\> Copy con abe. tat [saan | jabedes gh ijk Lmoopap eg tuv = | worn 42 a 41 fite _copted. A [ Ci\> cis 4 Lo — Tg vor —T £ 2 ° Tt __clésplays tho dish, volume tabe) are dotcap _ number , ip they exfet pow the obutue Apect biec} Th mo dsive ss specihied i} clisplays $05 “the acpite cutie . { Syntax Gt vor Cdeives] Pee | _Ci\> vot I vetume fn dive Cc hos mo Label. | volume Seutaf Aumbes fs €C24-77¢D Ci\>vele: - — Volume fy oojue E as Ned volume —_|| Vetume sexta) Number i 60ey4~ 4F09 —— ———} ———t Ty reve vos a ee —Syelber ia epaT Elo} Lia Le 0s] CEES) 3 ° © aaa c 7 alse maximum numbex & Snes _possible = : spaud inne. whereas _Uushng. {fe_and Is enecan Load 42 use 2 seetsacptoelles Zlename Cs) * gto 2 fle Cs) __#0 _g@ re Jou oe oon sotetaanas 0% Sond 1) ~to speci by cmuttiple filex+ Qe xcopy ome dick +o other dick . i Syntax $s xcopy seusce [destination] | L/a iy Ero t:dotey] Cp] Die ted] tw Cyt Dre} WJ Ved Vel Cy C09 Ca) Hes Cyr) C03 C/I Drs) 2/07 bx) WI Cy-¥) £72] exci : filer ls titera C+ grtegy_- See CeCe ee Creer eee Page no. LABEL C/MPJ Cvetumey £ - ——____ ese, eee 3 Ee : 9 and HakelT ibis “tha_labep } tho volume olisk. Cyne] 24 used do speciby

You might also like