Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
18 views
35 pages
DS Record
VTU 3rd sem DS 1-6 lab programs
Uploaded by
Blockstar Kinybharath
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save DS record For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
18 views
35 pages
DS Record
VTU 3rd sem DS 1-6 lab programs
Uploaded by
Blockstar Kinybharath
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save DS record For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 35
Search
Fullscreen
Outputs Enter the name oF dayt : Monday. Enter the date of dag: falo4. Enter the activity for days 2 donce Enter the name oF dayo : Tuesday. Enter +the data Of dayos ialalo4 Enter the pains for clay oe oting tng Enter the name Of day ss Mednadaty Erter the date oF dk 3B: iqlalou Enter the activity for day 3s doting, Enter the name oF deya 1 thursday Enter the data of day 4: oolalog Enter the activity for day 4 coriting Enter the name Of days: row Enter -Hu date of day > #91 falas Enter the actively Pr day 5 egiee ping.; DO MM vyyyy 10g ILLICIT FT| Develop 2 program fn_¢ for the following declare calend ver as. on array of + elements to represent Adayp of weel- wrtte Function createc)s read ¢), +d feplayc), 10 create calendor. +t fnclude 2 stdfo. h> at fnelude 2 stdifb.h> dt fnclude < stringehr etruct doy ; char * names fntdates char -« actiuPty: 3 stuctd ay xcreatec ) Street day calendar = Cstruct dayx) realloc (+ size of Cetrct day))s ?f Coalendar == NULL) : oan cn Memory allocotion failed \n”)s exitc)s 3 return calendors jEnter: the name of days 1 (feterday Enter the date of day 6: oolalo4 Enter the activity fer day 6+ cot ing. Erker +he name oF dauy #2 fundoy. Enter the date of day t: oalalo4 Enter the actiurty fer day 4? peo Weeks actluity details report Monday + (¢ ¢dance “Toesday » 18 # singing Wednesday, (a! outing “Thursday 100 : wortting Fifday. ai # fleeping Gaterday 3 02% eoting: fenday 303% phone.yyyvy Cnicncerry void read Cetwat doy calendar) £ char boffer CIoels; ‘for Cit Prog Peas Pr4) f spriott Cs Enter the name of day "dz 7, Pei )g — nf Ce fos"? , buffer)s colendar Ci. name=Cohar®) malloc Cc6trlen choffer +1) efze of Cchar))s Pf Ccolendar c?1. name = NULL) £ prot fC Memory allocatfon fa Pled \n??)3 “exott Ci)s 4 strepy €coalendar CII. name, boffer)s printf C* Enter the date of day Sod 2%, ft1)5 seanf Ceed, + calendar £?J+date); -printt 0 Erter the achiutty of day edz”, fei)s scanf (51, bufter)s calendar LF]. activity = Cehar x) malloc Cstrlen Cbuffer) +1) *s?ze of(char))s tt Ccalendar citactivity == NULL) f cprintfels Memory allocation atled \n%)y v 5strepy Ceolkndar ct7. activity, buffer) + 3 y vofd display Cstwct day * calendar) -print¢ Cs eoeeks activPty detatls repor#\n")s printf ("------\n"s fer Cint feos te#s f+) £ pantt Ct h6,¢hd + eh 5 \n2?, golender CiI.na : calendar Cij.dates calendar ltd, actwity)s 4 3 Prt ma?nc) £ Gtret day x calendar = create crs tend Cealendar)$ dfs play Ccalendar)s free Cealendan)s refurn 0%DOMMyyyy COLO try fn © for the following operations on Develop a prmqram stings > a: Read a main_ string Cstp).a potlern etn: Replace sting (REP). be perform Pattern Matching Operation: -Find ! + Replace all Securrences vf PATIn STR awith REP Pf PAT extets fn stp. Report suttable messages {n case PAT dow not existin stp, Gupport the program cotfh -fonetions for each of the above operations. Don't use Built-in functons. q CPAT)4a at include
NULL) * pant Ct the pattern dow not exist ta fhe main Gtring. An?) 4 7Ourpots o Enter the mafn diring Goganache' MV Enter the pottern sting? go Enter the replace ctring! goqe The new otring after replacernent 9r4q" qanashr? Mm vail a a ae DO MM Yyvy PM cocery 19Ovrpur: et STAck OPERATIONS °.Pop Ss. Display 4-Prele 5. check Palind mre 6. Demonstrate overflow 4. Dernontrate underflor 8. Exit En ter your chofce 0 Gtack under flocs 6 TAcE OPERATIONS v 1. Pus 2. Pop 3. Display 4. Pek =. check Paltndrom ¢ 6- Demonrtyte ove rflore 4. Demometrate underflore é. EXIT Enter youn chofee 4 pda deen ent 40 be pushed into Hu atick 20DO MM v¥vy CL) “ CHtack oF Integers. “Develop a _memu driven program 9n_C for the followin gope -rations on srack of integers Cfrrag, Implementation g Stack ewith mascfmum size MAX) Posh an Element on to Stock+ Pop an Blement from 6tack+ Demonstrate how stack can be used to check Paltadrome “Demonstrate overflow + under flow situation on stack. display the status of stack Focit. tt Include 2 stdfo.h> +e Pnclude < &td|?behb> 4h include 2 stdboolbhz se define MAX4 bool ~nstk Full Cfot Hs bool_finstk Empty Cint)s vord fn Push Cintca, int. fot) tn + fn Pop CPntcisint*)s vod fn Display Cintc r,tnts int fn Pek € tntcI»inhs bool -fnchk Polindrome Cint)s Prt maine) £ intstk Array (MAXI: er 21Stack OPERATIONS a-Push 2. Pop 3. Display 4- Pek s. check Pal?ndrome ( 6.\Demonrtrate overflory: -\Dernonstrate onderflor S. EXIT Enter your choice 3 Stack ‘contents are? 44 33 20 we Glock hor 4 elements STACK OPERATIONS 3. Push a+ Pop 3. Dfepl 4. Peck 5. check Palindrome 6. Demnomtrate overflon. 22ts : inne eel ag oo MM i inteb? =-1¢ Oooo Fs fot PeElem, fchofces t— tor C33) _— 2 eee prot C8 \n STACK OPERATION 5\n77)3 ee pratt CM = seteeerescrss 9 pg pantt Cs \n Ie Push\n2. Popin z. Disploy|n4> Peck \n = 5. check Polindrome\n 6. Demonstarte Quer flow\n a 4- Demonstarte CL Under flowin 8. EXIT\n "ds . printt Center qour chofce \n 7)s scanf (* efed 975 Pchofee )s switch Cichofee) caeel! Pf Cifnstk Pull Ctop)) £ printf C#\n enter clement tobe pushed onto the stack \n?s scan (iad %y 4 PE lem)? +n Push (stk preay »tElems j top)? j elee i aa. Demomtade ynderf lor Qa. EXIT Ender your chofee 9 “Popped clement Ge 44print? Cn stack Over flown )s break; caseos If Ci Fostk Empty Ctop)) felem = -frPop Castle Arrays44op): print{ Ci \n Popped Element ta “bd \n"?41 Elemn)s y | else t { eprintf C<\n Stack Underflon\n"?)s 3 breaks case at tf Ctnstk Empty ctop)) f print? Cn Stack Empty|n')s ; else £ fr Display Cotk Array, top); breaks cas4t tt Ci fh stk Empty ctop)) f 25DD MM yvyyyy | L Elem = Fn Peek Cott Arroy stop): printt Cin Elementat the top _of the stock Ps %d\n”, PElem)s 4 else printf C* \n Empty Stack \n")¢ breaks cases: paott Cs \n Enter number to be checked-pro ‘Ppalfndrome:??)¢, scanf C* cfd, $fElem)s it Cfo chk Palindome CfElem)) ae Coin ted fsa palindromei\n’?, PElem): 3 else f ’ "5 7Elerm)s printf Ce \n hd ks nota palindromeln + 7Elerm)e j breaks cases: tt CLfn stk full Chop) print éce In There ane currently thd elements Pn stock In Push */d elemnts for Stack tv overflows top+l, Max Ctoptl) )s j 27while C1 Fy Stk full Ctop)) rite C*"\n_Eoler an elernents 9) + sea nt CO ada, flelem): rn Push C€ ste Array st Elem, +4 top)s 4 paott C\n Stack Over floc cannot posh elements onto the Gtack In”): breakg caset: ft Ci fnetk Empty Ctop)) sprintf C"\n There are currently ‘hd elements fr Stack \n Pop out ed elernnts for stack to Under flow”. top+4,topta)s cohile 1 fa stk Empty Ctop)) ?Elem zfnPo p(stk Farry » 4 top): pratt Cn Popped Element fs ehdin!} Peder) 3 pratt (“10 tack Underflow cannot Pop elements from the Stack \n”)? breales cased: extt0r) $ - default: printf C0 nrong chofeen Je d t t 5 J 29(OD MM ¥ vy LICLICLIII Mint) pedurn Cot=2 MAX-1)9 “hue 1 felac)s q bool fa stk Empty Cini +) reforn (Ct ==-1)2 tue: falee)s y votd fn Push Cint Stk, int tElems int *t) K¢s%*bt4+12 otk [#4] te lems j int {nPop Cot stkcr,fnt*t) jot telems felern = stk (XLT: return PElerns 4 votd fn Display Cint stk 07 brett) £ e inti;- — wee Do MM vv¥yy printt Cn stack Contents ares in for Ctsts Pris 4) f£ pant Crt d\n, StH ETI) 4 pratt fs stack hay hd elements 1077, 441)3 j Pant fo Peck Cint stkc7, Pott) 77)3 return Stk CeJs 4 bool -¢nchk Pal’ndrome CintPVald int pal stk Crore fot t2-ls iDigs Rev = 03 fat Pcopy=tvals while Cfeopy! =o) L P Org = copy % 105 forg =I 1ld=1 -fr Push Cpalstks? pias ft); PCcopyt=los 4 rat pra 33— = — DO MM yy yy mit C1 TI while Cp 2=t) Lf Dic y= palstt: ¢ 73 PRev= fRev¥ jo +f0Ig 4 pits "t CfRev ==? Val) return tes elec refurn fa Ises 35e a es Sa Develop a pro a co — : pregram in Cfor Convert; : + . verting an 2é: ae to ostfiz Bx ression. P. = 2 le ape a nthesteed wp en Should eu port C iho theslecel 4 free parenthesized czpresston cor operer FS3 to~9 By /y (Remainder) ,*Cporses) ¢ alphanumerte operands, st Include < stdfo.h> +t Pnclude 2 ctype+hr include 2 Stditb» hz Hf include 2 string sh st define STk- SIZE lo void ‘£nPush Ceharci, int* ,char)s char “fn Pop Coharl te int# )s Int fn Precd Cchar)s3 fnt maine) f int? f=O$ ch od ackzepr [50], ac&tack (60 ,ac Postls0bcSy fnt top ocly =mb;7 -printt (In Enter avaltd fn fiz ezopression [nts scant (# ef 6", ac Fepr)s {nosh (a eStock +} top» tH"): “fer Cf=03 acBuprltyi! ='\0's 4H) £ 37cA — emery
It fnclude « stdiPbeh> db Include zsting-h> +t include 2 math-ho Ft Include
vold towers Cint, char, char, chor): . fat maine) tatnums print ¢ CO Eater the womb er of disks :*)s scant (fed. 4 iom)4 t prot t Ce Tthe Sequence of moves fhvolved fn the “Tower of Hanofares\n "3 -fowers Cnum 1A, 80,6 B)s pantt C\n 3 retorn 03 = fowers Cint noms char topeqs chor auxpeq) ft Cnom==!) en +# C\n Move disk 1 for Peg shorty Peg fc, fromPeq + topeq)s returns oe Cnom-l1 frompeq + auzpegs topeqiy 51—~ Qutput : Enter the number of désksro -the Sequence of move Go volved fn Hu love, ap hanoi aus move dik i fom fae +0 peqe move dtsko from pegA +0 peg ce: move dfsk! rom! page +0 ageDoM ener) y al printf (* \n Move dfok hd from peg the togeg the, mums frompeg «topeq)s ‘towers Cnum-t+ auxpeg stopeqs fompeq)s 53
You might also like
Pharma Book Final-1
PDF
89% (36)
Pharma Book Final-1
270 pages
Ip 2018 Vol-1
PDF
50% (2)
Ip 2018 Vol-1
600 pages
Food Chemicals Codex-The United States Pharmacopeial Convention (2012)
PDF
100% (6)
Food Chemicals Codex-The United States Pharmacopeial Convention (2012)
231 pages
DS LAB Manual (2) Final
PDF
No ratings yet
DS LAB Manual (2) Final
53 pages
2021 Food Safety Officer Book - SWA Education
PDF
No ratings yet
2021 Food Safety Officer Book - SWA Education
552 pages
Final DSA Lab
PDF
No ratings yet
Final DSA Lab
62 pages
DS Lab
PDF
No ratings yet
DS Lab
67 pages
Dsa 12 PRGM
PDF
No ratings yet
Dsa 12 PRGM
49 pages
DS
PDF
No ratings yet
DS
51 pages
DSLABMANUAL
PDF
No ratings yet
DSLABMANUAL
35 pages
VND - Openxmlformats Officedocument - Wordprocessingml.document&rendition 1
PDF
No ratings yet
VND - Openxmlformats Officedocument - Wordprocessingml.document&rendition 1
120 pages
Food Processing and Preservation
PDF
94% (17)
Food Processing and Preservation
372 pages
DS Lab Manual With Output
PDF
No ratings yet
DS Lab Manual With Output
73 pages
Data Structures Laboratory
PDF
No ratings yet
Data Structures Laboratory
50 pages
Iso 22000 Manual
PDF
100% (10)
Iso 22000 Manual
62 pages
BCSL305 - DSA Lab - 3rd Sem
PDF
No ratings yet
BCSL305 - DSA Lab - 3rd Sem
32 pages
DS Lab Programs 1-12
PDF
No ratings yet
DS Lab Programs 1-12
51 pages
DSA Programs 1 12
PDF
No ratings yet
DSA Programs 1 12
67 pages
DS Lab Mannual - BCSL305
PDF
No ratings yet
DS Lab Mannual - BCSL305
63 pages
New
PDF
No ratings yet
New
30 pages
DS LAb Manual
PDF
No ratings yet
DS LAb Manual
60 pages
Data Structure Lab Manual 2
PDF
No ratings yet
Data Structure Lab Manual 2
52 pages
Ilovepdf Merged
PDF
No ratings yet
Ilovepdf Merged
112 pages
DSA LAB Programs
PDF
No ratings yet
DSA LAB Programs
59 pages
DSA Lab
PDF
No ratings yet
DSA Lab
91 pages
Lal
PDF
No ratings yet
Lal
53 pages
DSA 1-7 Programs
PDF
No ratings yet
DSA 1-7 Programs
26 pages
DS Lab
PDF
No ratings yet
DS Lab
63 pages
Aiml DS (BCSL305) Manual 1
PDF
No ratings yet
Aiml DS (BCSL305) Manual 1
45 pages
Dsa Lab Manual
PDF
No ratings yet
Dsa Lab Manual
11 pages
Dsa Lab
PDF
No ratings yet
Dsa Lab
61 pages
Data Structure
PDF
No ratings yet
Data Structure
42 pages
Batch Manufacturing Record SAMPLE
PDF
80% (10)
Batch Manufacturing Record SAMPLE
8 pages
C Language Notes-2
PDF
No ratings yet
C Language Notes-2
40 pages
Data Structures Laboratory-Bcsl305
PDF
No ratings yet
Data Structures Laboratory-Bcsl305
64 pages
DS Lab Manual
PDF
No ratings yet
DS Lab Manual
88 pages
Ds Lab Programs
PDF
No ratings yet
Ds Lab Programs
20 pages
Dsa Lab Finall 2.0
PDF
No ratings yet
Dsa Lab Finall 2.0
47 pages
Dsa Short Prs
PDF
No ratings yet
Dsa Short Prs
26 pages
Dsa
PDF
No ratings yet
Dsa
19 pages
Maths
PDF
No ratings yet
Maths
20 pages
ISO 16140-3 2021 (E) - Character PDF Document
PDF
100% (11)
ISO 16140-3 2021 (E) - Character PDF Document
84 pages
PGM 1 Ds - Merged
PDF
No ratings yet
PGM 1 Ds - Merged
48 pages
Data Structure Lab
PDF
No ratings yet
Data Structure Lab
46 pages
Programs
PDF
No ratings yet
Programs
28 pages
Lab Manual-Ds Lab
PDF
No ratings yet
Lab Manual-Ds Lab
79 pages
DSA Lab Progs Dr. GT
PDF
No ratings yet
DSA Lab Progs Dr. GT
35 pages
Dsa Codes
PDF
No ratings yet
Dsa Codes
22 pages
Dsaf
PDF
No ratings yet
Dsaf
31 pages
Dsa Manual SH
PDF
No ratings yet
Dsa Manual SH
50 pages
Program 1-7
PDF
No ratings yet
Program 1-7
21 pages
DSA Lichil Beeg
PDF
No ratings yet
DSA Lichil Beeg
15 pages
DS LAB Programs
PDF
No ratings yet
DS LAB Programs
23 pages
DS LAB MANUAL - Deepa
PDF
No ratings yet
DS LAB MANUAL - Deepa
42 pages
DS Lab Mannual
PDF
No ratings yet
DS Lab Mannual
57 pages
DSA Programs
PDF
No ratings yet
DSA Programs
20 pages
Sop of Production Department
PDF
88% (52)
Sop of Production Department
185 pages
Manual BCS3053
PDF
No ratings yet
Manual BCS3053
87 pages
Ds Programs
PDF
No ratings yet
Ds Programs
22 pages
Lab Manual
PDF
No ratings yet
Lab Manual
95 pages
ISO 6579-1-2017 Amd 1 2020 (E) - Character PDF Document
PDF
100% (4)
ISO 6579-1-2017 Amd 1 2020 (E) - Character PDF Document
16 pages
AOCS Ca 5a-40
PDF
94% (18)
AOCS Ca 5a-40
2 pages
DS Lab Programs - RK
PDF
No ratings yet
DS Lab Programs - RK
31 pages
Dsa Lab
PDF
No ratings yet
Dsa Lab
89 pages
Pythonai
PDF
No ratings yet
Pythonai
7 pages
Data Structures Lab Programs Fibonacci
PDF
No ratings yet
Data Structures Lab Programs Fibonacci
53 pages
Dsa Iot Manual (New) .............
PDF
No ratings yet
Dsa Iot Manual (New) .............
60 pages
Micro
PDF
No ratings yet
Micro
2 pages
FOOD SAFETY MANAGEMENT SYSTEM MANUAL
PDF
80% (25)
FOOD SAFETY MANAGEMENT SYSTEM MANUAL
44 pages
09 - Validation of CCP & OPRP
PDF
100% (9)
09 - Validation of CCP & OPRP
57 pages
BCSL305 - Lab Manual 1
PDF
No ratings yet
BCSL305 - Lab Manual 1
56 pages
Iso 6888-2 - 2021
PDF
100% (3)
Iso 6888-2 - 2021
21 pages
Dsa Lab Manual Yit 2023-2024-2
PDF
No ratings yet
Dsa Lab Manual Yit 2023-2024-2
61 pages
Food Safety Culture Plan (8678)
PDF
82% (11)
Food Safety Culture Plan (8678)
3 pages
Jewellery Policy
PDF
88% (8)
Jewellery Policy
1 page
SOP For Product Recall
PDF
100% (13)
SOP For Product Recall
5 pages
Yogurt HACCP Plan
PDF
96% (116)
Yogurt HACCP Plan
38 pages
Aoac Method
PDF
83% (6)
Aoac Method
4 pages
Method Validation - Report
PDF
100% (1)
Method Validation - Report
8 pages
12 HACCP Validation
PDF
100% (2)
12 HACCP Validation
45 pages
Bsa224s CW
PDF
100% (2)
Bsa224s CW
1 page
2.basic Food Microbiology
PDF
100% (1)
2.basic Food Microbiology
42 pages
VACCP Template Food Fraud Vulnerability
PDF
90% (10)
VACCP Template Food Fraud Vulnerability
1 page
HACCP Plan With Flow Chart-1
PDF
No ratings yet
HACCP Plan With Flow Chart-1
23 pages
Certificate of Analysis Procedure
PDF
100% (1)
Certificate of Analysis Procedure
5 pages
SOP For Changeovers Carried Out in Manufacturing and Packing Area
PDF
50% (2)
SOP For Changeovers Carried Out in Manufacturing and Packing Area
2 pages
Loss On Drying and Validation of Moisture Analyzers
PDF
No ratings yet
Loss On Drying and Validation of Moisture Analyzers
35 pages
Iso 9308 2 2012
PDF
No ratings yet
Iso 9308 2 2012
17 pages
Spec-Shilajit Extract-50%
PDF
No ratings yet
Spec-Shilajit Extract-50%
1 page