[go: up one dir, main page]

0% found this document useful (0 votes)
9 views10 pages

Pop IA2

The document is an assessment book for the Department of Basic Science at Sri Venkateshwara College of Engineering, Bengaluru, affiliated with VTU and approved by AICTE. It includes sections for student information, course details, and various programming examples related to data structures and functions in C. The content appears to be a mix of instructional material and code snippets for educational purposes.

Uploaded by

ajayjena8765
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
0% found this document useful (0 votes)
9 views10 pages

Pop IA2

The document is an assessment book for the Department of Basic Science at Sri Venkateshwara College of Engineering, Bengaluru, affiliated with VTU and approved by AICTE. It includes sections for student information, course details, and various programming examples related to data structures and functions in C. The content appears to be a mix of instructional material and code snippets for educational purposes.

Uploaded by

ajayjena8765
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
You are on page 1/ 10
D- i Accredited by NAAC & NBA’. Ss V G E BENGALURU | ie SVCE*" Ea Gooy SRI VENKATESHWARA COLLEGE OF ENGINEERING —Aflated to VTU, Approved by AICTE, Recognised by UGC uls 2(9)& 12(8)— SRI VENKATESHWARA COLLEGE OF ENGINEERING (Affiliated to VTU, Belagavi & Approved by AICTE, New Delhi) VIOMANAGAR, KEMPEGOWDA INTERNATIONAL AIRPORT ROAD, BENGALURU - 562 157. ASSESSMENT BOOK SEM: AY 24 SECTION DEPARTMENT oF _Baiic Science Programme Student Name USN Course Code Course Title ee Aas= signature Signature of the Course Co-ordinator sorutinizer Sig Signature of the Student en Pret—Z 2 |G) Assay # 4% a Homogentout collecton of clement unded Bame name — anc dame dads. ty fe. the dole fheted Beyuen tually Hat if, one offer th Fay de otte?. Syatoet ~ — dobetyfe ottay name [4 Sized vwhehe, dobaty?e + Con be ant, pleats chads double abhay-fame ¢ Name & dhe Shay aghay. Si32¢ tre ay FE single _dten ional orbay? The athay onsite of only one gubesipt OF indec A Mromy of Fingle dim engione! Shay, Atay inde jth Prom aay lo] and he age element will be nverbeh of elbrntlf. Bred in ar, whe ne % he itlizatien single dimentionel olay Syn tees dofafyPe — atbay.rame (p73 exenfle int numbrs(sy L's 2 1341 52 Wdecdobabon & dey lag ond initialrzaébn 1 will be Shore mn numbers [07 2 will be 4foied in mustberh 17 3 wll be 4totel In aumbey [27 anl fo on. Hindude< sHio-h > Hintades stdlh.h > ord matn( ) f int a0), Jowehagh » eval, agp, 7, ley Jm=0, Aighen-l, loc= ts Print (" Eaten Re numbeh of eltmentf: i dene" Ld, an); Prot ("Ets the athay clertad tm ollending otded: ; forCizo; enjite) stant’ fed“ 426iT); | Panif (“Eater the Seatich elements“); Seong wd" gle); while (dow Z= high) mid = (lew + hig hia) ; it (ele == a[mid] ) Joc = mids reo 5 | dse eC de cafmidy) high = mid ~15 be | Jow = mdr s | ? if( loc >0) © pinfet toot oh deed: 4d", be) ? ue PReth(" Frveltd inf); 2b. i) #inelude
int ceacleC 2 int 1 pony Ente he Sad + “5 Btoof 48", &¥); area = BHP OS Yetukn YF 9 vord — motnl) iv | int veut repult = -cacle C5 Path "agen of Be cacte ¢40 wetull) 5 i ( ° mettod of & function Cally wel (fi) Recussive _fenction: a ti te a aH a Se pe fel callek od Reabfive functor. Example and — wotkting? ry ued fo fork factorrel of @ rab Like nf = nt fn! (aay! wand Fe 09. Eincdude int fackoral (int 0.) He ip (n==0) teh 3 | eke rete —n *factor'al (n~1); | ‘void main) i¢ sak num , veh printf" Ente a. murrbe + Ys Staaf ("dy Rouen) fetulh = foctorial (num)’s Ae’ Factoral of Be prunbes ¢ 14", seul); ? ( | fot -E Sa. (i) SPtatO) : Gnttatd to steingh. TY Bo Biting fancier used fo aad (on tabinadion) fo differnt string 3 Sees ste =” Good "s | ste = “maiming”; SHGH(StT, 542) 5 | OwfuE? Good Morning i) swcey.: Thy fection tryed to Oty one Hteng fe arated Striep. Evomple : : | Stl > “Goed | strey (stra st); 7 Hee BHT PIR te cre fii) serconpC): Thi function ComPaheX eveny Chahattd ef a strhy wih other Stung. Tt wehdnh Hue if s#l = Stt2 orelye fabio Exomple > trl = sien 2 stecme(stth 9427 outhut tf: pawl 1 (true) Gurswerorcy « me functor vteel fo Heverlee ren Hp Example ¢ ; sit = “Hello” otrrev (Stl) witat poe obledl | ‘al Liyswcn mt fanedon 8 wel conve beh oe any fo PNG Fronfle! Los | stl 2 “cok | strupe Gt) > outfit CAT sbi coll by vwlue call by sent. pee, the wabioble or He value? «Hel, the Vhiable addvelt 1 Ried | ate pad ol open be He ag oh purer, b& te fuathon, function (1 He welue Connot be alfeled | ° Me value! ‘Con’ may Pe altered | doting vxentien Se ‘vee Gan be paged by |, addgex Con be fated by solvable | Rinks, ae reluined |e The outer i Sebrsned in hg & values i foley ag addlferr. iy ef too quer bey: oy Gl by wlue: Hindle stdlibs h> ine dum (int x, int) ¢ geluin KEYS 2 pe marn() if sab @y by Sele 5 frei" Enteh fewo wre “Ds Beane C" ted %d", ha, 273 galt > Sum (asd); Pak C Sumy of he nuntbess ¢ Za heb); 1 | By call by vefabtnte + | Binclude < sith. A? | iat sum (ant BR yah AY) ¢ rebdkn RK TRY P void moisn () ene rer 4 aa Pein F RALCERA for numba, % Borg Cd Hd, Ra Ab); = 12 aay ded PR (ar = joule = Surr( prt, PRED; unbests dy REDS print CS ot He fat - ZL 5. Son Mod . , lo collection ef Clerentt ee (i) stouchscs + ma Hebthopentord NTT Ma egined de tyre OF die Pmilad data tyes. | Decldation: pecletaten of on Stacie qeaug with Heysacidl | struct | Syntace 7 gtauct — Structule_neme c doko. rmembeh 5 dale. Hem eR 2 § | 2 itrol' ect Tribalizotion: ThE dale members ote Stuchtle con be individually and Com be accemtedl by dot op Barter: | Rogar ny Com ple? #ioclude sfauck — Student | ¢ | tnt olla; | chah name (se]} | void main( ) | | Btmuet Ahern S; Pant Ent the Pall smnleh of Shedints 7 Aaah (dR res) $ punky ("ete the name of he Atadente 7; Ktoaf-(* %S™, &S.name )} pentf-C" student Roll-thunbo ¢ Yel +» Sxtellwo); pntLC® Siucenty nome t xo”, S.name); | (ii) _ Struck e on + Heyword Btruct Wo yed fo deere sHey word union oo Wed fo ___ Strahule_ define 4 unton © Te compbeh alloatey oo wane | + Fe¥e, all datamembot Ahalle menoty lecaktn to evedy Hevea @ fingle memory lecain, in _Siruchie a pve to which yallshing value ca |. to which, altehng The fo ont dole menbes — loek not | ome dal. member altehe he L_eflecr the offes data entnbeM Oh data memberg, + Te Mize de Steuthe % Cited | 2Siz@ o& an wiion & etual fo ot Meath Hon Sun ¢ oll we de Bye of ledgort the date. menbebd dake. eenbeh 2 All Fhe dod onterbeng, Gan * only one —rstnbgh H—vale Can BE be amened at a me acted ob a time 3 aia Stew SHRCLE nome =e Synboe £ , ears ve Unlernname dakomem bY 25 dete menbep |; i cazmemles? + th 3 Bi | ab. | Swsffieg sy hoo nwmbEs oy cl hyvelue § HB rpelude cotdlibe h> int guvep Cint xy int Y) a int feels temp = 5 | x= Ys | y = Rahs | rein XY > | void moinC ) if tae BY | 1 gules | featp(" Enteh fen nwribenf 3 Beanp (ed Ha, ka, ADIs spegubte = aeneCas b)3 5 , pate Co Swneted mumbo A= ed gerd 40,4): 7 OY Cdk by Sefahence pinclude int Swap (int won, It * pte2) ¢ int Hone temp = peel s | pith = PIL; | prea = peels verd modal) int aby deret g TREC RAS Rus un dey: “Y- Front (ed td") 4044) 5 eg = re 4 ' iehelts 7 SC nated as Ya NO BE rel \ 943);

You might also like