Download as pdf
Download as pdf
You are on page 1of 112
‘® Sproarammindllavauases? Te hich ze used) te insbaud The cat certain (abs ave called ated Pap rem ig u pee_Loappister natu. imple 900 nayatoing lang aniaus prog 8 Ly Seg ages aes Nhe tt, Draco Passe” Corti), Zarit, Lisp ate woes af prea amming anguace ? Describe ach a ention Salsa adr afk Cond di - adantage ? > Ther: reph types _o prep nate language. @ Meckene > Lew level hnguoge (s @ programpang lang: ay in whith eadh “slatoment lor icky bian 15 Tally transbted into Lingle machine cade It is 4 reachine dependent rea partiwhr los level ; language works only For orkin machine. There ave two bfves of low-level weer \anguage : a lang LIE. ue hy iy Ne U4G ES) Laces Yndesbiad be computers Pachine Vpn ages care al f tras sible faces to use becabre thoy consist atively of numbers ol “tea uber. ELL transh & to tray arb be CH ; Fe ri atin toad ty Tope ee = zi "5 hand b dicd nd or Lind! errors tn @ Progra | written in he wnackeis 2 level language. | -An ably fang wag bowel woyrandn!) i iy langutge bl aiden beacersar and alhel plogramndble { tee LL rs not just @ single language, Uud vathe V I soup of lag agel. Ar assez bls langues inplemerds Eee vepresbydation of loot woah ie cod. nekde to prog FEO F Len CPV arch becure. - Assomble bnguage ps easter dnderstand and i ah cor payed fo machine Lengua 2. - 7 3s sy - ate and norred? _pyrays. - Tt 2astly mod /tie2d. l= Tt ts also machin dependent pacific. | = The preograminer ako needs 2) under: tand Lh | hardrive. - Hard to vemember mnemonii - less eeient an machin avagusgpe High rug! Ahigh level language ¢. apregramm|ng. langue Frat | ent enables 2 programmer fy wrih® prov et / are-more or eS. Kelepenclent p particular typ: £ camuter Sih langrea: cue considered high i level because Hey oe Lose’ te human lorguages and | turher for wiarclin 100 UGGS. dg i Havandege of HLL = Easy fo use = Porte bility gd - fas4 debu ng Le Easy and fait velapment 0. cobb weave. (= Machine jndpordend: soph meres meron lteeeesanenl i - More execution time _ = Need own translater Translator I; ve tdi. Lan hinguSs, “S we ome LaLOr Ber Ye type of translétor. Machine linguage ix oly verder stand bs ompupter. -Capiler™ _lompiler is a tansleter which is wsed fo convert eg rarn¢ [2 big be level lnguage dbo [o22 = [ovr ee Ld fa eC enhe program and k Yepork PAIS I? Source jOagp ram Procol y= ter: Waring. Ye beinslabinn. ee - Zell contained and €lFiciewh = Hod wewe optimize’ fon = fat exe cubln —disadrondage of compile = Satire ar eoxapiler editing and deplyi ny Whe code a bt elower Phan interpreters. Interpreter Ltevprler isa Travelebor kil used Yo convert MAU. e. ln ler L bam: lak line by ine oma veparle [he _evrer once ib encountered during Yhe 4 i tran lation pace SS. pam ak acs = Debusaing = rm le jemnary -_les: pra peveshiny d 7 Interpreter rey. [gutey ban 0K P, hy. E [ t dias ole : api at 2 ampere prog rare Ted YD re’ ye gravel tn asserabh/y ode_an, ruchin. DL, into machve it Us can be excuted bes empurer Advantage of assembler Compiler Inderpreter” {_ Compiler zeans [Ae ntve |4 Tnterapieter translates. program belove tar ating and excules WE program Linh machine code. [me by Line. Ss Zyntar eyrors can be Syntax eyoys are found! (2) hy atter the compilation at ‘camplet program: trapped atter franslaton o é every line. J Tt takes less execution |) Tt tekes more execution time. | time. Prog yeam mina, languages 4) like C,¢t+ use Prog ramming, languages like Python, BeSicy and Ruby compilers, Uses_in terpre fers. Memor age js etticien Requires more naetiey ck 5) linking is needed for no intermediate gbyect-code bee generated intermed- pate” obyeck code. fi generated oa Ht include ## include void matin O prinklhC Stucky? name is dott, "); geleh Ci Heinchrde estdiah> Ht tinthide_ _————> Hecision rrerkino <> Veen, Minit tiered nore ordain tienclin mien maiiania mained aa looping : > Adwanlages of Pescharbs Communication Etfechue ly Proper Slocumbndalion Be Hbictenk Codi Gai in Sp bu ig and pre gram maintenance sly fs je fe Pisiiee ° Complex toa to e tPEcud Fy in_atlerabn an rradhlaretina as STROT » T moet EA tong 44 et o_for_ ved b ih Lava bi : i Ding ix Te, pases of bsleceing.papoer pails i like algerie and Lsehowt | cmpuber progr | - Alpesh wall detined syntaxes testy progr nlAgp language Wh c, C#t, Java ete Ue. process at ay hi Language into ine _level ‘hatlce is kena wn 24 Comp! takin. | | Td. 1s deme by speial sablware, known 23 comprler, | 0} d, fot ~ ginlal rs, syne y -eners or rok. TE syntex j ewre_are present, Compiler can r=) oi he} cacle | Aller roapilabiay complete, yun a program 2 dled a4 erecetton potgrem mad euk User gevanbes _Gulpub alter pres sein the inpuls During. Lhe excedbton, Pre j Ler inpcd end! geet y ai 4 “ag 4. is He "Ty and nln of, progranava! ig. fven aller Alig pA cm pepe aly ond coding , same ef7y5_ fr Ad pog rent j er hav hepuus, He_destyner | pray yeunm. paver Voraghh Ghoul apo Youd ew cade. By ating, ing. dda ti program be Cdk 0 Yhs_peeqrom Thoue logical “exav a ae ce ee Semadiz Serv ave pucsonb or uk: — fp dasingalein i He detain ab peg paps ay if hg: serattee b eeppewt worcle. ae ms Yograny by ie fet WMO WNE, matzbyin and extend 2 puragre |, Liby A_pesnem mag be Attill fy underdbrdd even Jo Pregrarobe who wrole be cake als, Y_sone LD) LAI coke eY(IY) Is fe be malhteatnad and ertended hy off XCD, Hore ni) Le meam=dibiinde po Seoted | 3 oy ze ercband if. LOD My Noe uneer2 rare 5 necetsa Dt will he uaschd gad Coble? io eblagag tote, rralntleran, and redesign prmcete a Lepe s of cheumentations; | @ Programmer ts hy Lohan © | ' 2) User Ma cumente bran J | Crogrammer's cloeurmentalion /s prepaved ter kybuy reference to the programmers who rain tain, 1 veclesign and upgrade the system T? may eomleain letaied vequiresents of pesaram armel of veports Byms, logic oF thd program, data [od diagyam , E-2 forms, a/; aan ane) Llya chart of. 1_eath com t , Input 22, sect put data sed for esting and plher veberences. a The user cheumentation pravicles speach be cer | of the, program This provides instructions fxr inchall--§ 1 tin of HY pigs ate acl usze—of jd ettectively. tar: f ody “Enter bus numbers! 5 ee A cand &. 4. C=ArB E f S. display 7 es stleo ot tea numbers: 7 6. Shop j 7 (starr) 4 head two . a AEB 7 : [ee p 7 : j ime display Cas Sum # AER (Eno) a eae Algorithrn: dt. Staré 2. display "Lnfer value of 2 Tand £" 2. Read L Land £. 4. Lolealote simple jnfbere LOD. faremudin, ST = LPF THR )/ 102. i ‘sp fe Ss. 2, ib- GST Elowtlurt (SIA eT} Lhewdvalues Lar __ and &. [ Calulale Simple Ibert ST]. La Sree tteyle Display value of Sr _ (Zn) t_6 START ; 2. Print "Enler a number whic abe tested Fir eve or -ve »). 3. Read Num From keyboard : 4. Tl Numeo, tren Display mescage “The number ws Masecfave ” sbbonutce ahs ip Ted heey gq numbir jx _pasttive" 2 S_ Shep | Flauchort | (TrT) | Lead a num ber, pier | eed | IED Lint _———— END Nolet: Here zero /'s assumed eve number ex lemacre hmniire enn sonnei Alaarter ft. Shark 2 Priplag “En er a numbey which 1's bo be eiled ~ veh av ade? 3. head Mum Fram tsen 7 ‘aleudal? vemalnder LEM usar beg dh of Mm Ly 2 m= g ie TL 2em© a, ban prnk! wrabey bs even” else print © Fhe wunher ts add \" G_610P Llenschort 5 ‘[staei tat anurber DUD? leultulabe remainder b L diibig rum by? Tre Se / Fe ES P ] pga” Lbigh peisege 8 ron Mrtber add Ubewrber) t = eet | yan tania eda ae earlier Algorithm | 4. "START 2. band “Lober bee number i 3. Lead ree nunburse A Mand C @ Th Ar=k amd pnz=¢ Hen pupl "Ars greet STE 2=A ome) R226 ben priht “bis greatest "ele 4 punk ('c vs qveabese™. f G. Shp Elowchayrt Peadnurdboy | ALL : £ je > hey 1 L { 1 VE babe Fale. Tree 4 40 2] Are I G72) 1 | © | J | 4 Tie Aes [Bispley Cos v [ grestest gvenker b, Tb tspley Pes [ [ greater h L: LSC end Je ere pee re ee eer Alazabapa: 2. START 2. Prind “How many nunrbers 2" 3. Read W 4. Indialize variables S000 lo 0 and Gunter fot je. supr20 Qnd qunfore!. S__ Put & Lyfer 2 nium ber". &. Read Num Z. We Sipae ora g. COUNTER = Cousrep rt. . £ wre kh <=M then. gale shep o Peink sum i. STop Elewy chord a Bead veehwe fen/ v [Gumeo& Counts t T . ‘ Fels I “Ys ub ] [ree Lip lag Sov7 [fad aber 7 / Nuswy JL ] Grr Jj kum sumeui | J —Teonir= ayret] ae \ Peenele cade 7 atermed bijeh - Level Wiplin ~ i fhe Gata iisple oF 2 Canipste. peg rae oO Agor{larr 2 ve Ly spruciey eH Gee parr : progapmriny lang Lior fue 7 Yeading “rebeEir Yeon mec hii ats Lie. datade ty pre oratts dekaile Lpat a eseBy Ci Gree Ge dersbaradijay abyortlapn, such ad | vewrnble declarcbined, Sherr specilic ode and — Sone recat beg The (2x yam, wg. (AMgUAIE _/& augmented vill pubeirel lac rt phir de Yeh usho pvenicnt, or tr'hy coms, he miki tect wdlatide® i: Ly zxier for pesple } (le ded Low convenbivod program Lge Lee age code, an Heh £3 cbbtied” and envitanrest = ncLepertert phim ob be key pribeip le an_altar Ihr TLR oxamanle used ‘in textbooks cm ste rc publicabiarr thal cme docetranlibge aries onthrns an! alto in plarpinse” of computer py leveloprrevh , for eter aid Lee hire _o voqram belo He cube Ahgy, s place. eg a ee ene ee — 1 high. va + Zs DDG re KA pps lay Ls te Levealap A beds oe ; ihe appli wd. ee Onginallip intenckd be 7 Z sb tu epnis Kitchin System in be arly 19705. perceti nay, Kianked amony Uo w st iidolee Used, agtean, her 2 compiler bor mort a lar sy story il void main O , i int a bc; printf ("Enter tHe yalue ofa b:"); seanf CYdtd" &a & hb); C=arh; print £C"' Sum af too numbers Is to "e): getch d); Akernative melhad 4 3 lines same like a tnt a, be; tt print (Ener First number: "J; scanf ("Xd eq); post (Gi, 2 number: ''); ant ("hd U & b)s ceaqth; Print? ("Sum of bug oursbery 15: 4d tc): getch U0; 2 pis + Note: TH gher program I'he abbédas sub breach mulbyle fb wank chomnge s/9n Lg up _pzyram process yeillye ba} is c=arh Change” Hu'=. Bub in cage — we Use. Lore ~ rnadh fre abjans sy + 4 (ncluderestaig ch> vs maint) ea a b c3 printf ("Enter the value of tus number: ' a wank (76 tt "| Go Wb); c= afb; prindt (The divide of two nuraber edb Vo)s geteh O; 4 U floed i use Ar decimal numbers we can use alsa tn add, stby and multiply but when we _use ind im divide we not aed oecu rede veut. '"] F#include zetdio.h> # tuclude< conra.h> pint waind £ floc _p. by st; printl ("Ender PRTG 2: "') sconEC VEIL LL "rp CE Xr): siz Cp*b#y)/ 100; prindf C" Simple Lndovast is: 7h"): gethO; rebar 5 Be ee ae a # include # include 2 coniy.h> lot pain} é that plz 3.14, ¥, A; print hCEnter Ue ved des 1"); seankOU fen); Az pixyyrys privdt WM Awe oFcicle: Lf" A) geteho; ye turn a3 = | age ON ee Hinchide estdioh> # indludezconia.h> int mein $ int_L, b ph; puintl (Ender Leng hh & breadth: DF scant Cd fd"! &t &h); Ph=o¥ (1th); printf ("' Perimeher of y. Ltengle is: Yo | pe); getehU; vehum 0; 3 > Snel ol fede ade 1. TE shidentic gue is qvectey Thom o-equad to 60 Pan} "pasced™ else rnd Tne” ho Set otal fo zero ch gral Linder fa on whe gade counter 1s lees Hom ov cul bi lop Lupud th etd a veicle Ad! the gree ily Le hoy, bk : wis auerage fy We bi al dade fe Ln. Pand the class avertty. f Tella feted bo ZED Lniltalize counter be zero Input Hofer bist a vadk while fy wer hey Sot as yet entered Dy eulvel add this grade nh Vo venyig Akl add one’). Hw grack poun fy inpul Hho _pext qyeide (po thy de sentinal) ih He canter “1's ned “zona. et Ye oveévage fe Ihe div'ded! by a counter potht Ly averdy else. plat “me rydes wer entered —1 Teale Sakig this sechim condaine a 7 oF commen? Tine glvin the_name oF Pagrcan, te author, aborts po 44, used and other dobaile Ine will Be usehil in Lterre res and cbveloping teams. The documen. Hon acts a9 a communication. mecdhupy een members of fhe cdeveloamenk beam wihan a nurrbor of developers ave working in the sam project Tt help whi debuaging? ond tecting- the proqram, EE tells users “hay bo Se nel adhnivk doy He hnks inpyl/, t tarehios ke prindll) and canto wilh He pagmm. Dis section _'s alo called the header. Aleclover tan Section. in aset of header Liles in | which seve re built-in Rune bing crs debwed rp the Whravies ynder these header thes. 3. Tn thé section _ all symbolic onstene ove defined, LIC COIS COE — TE I SEL SEAT Tk varia. Mee which are £ ceo) in more 4ren_one hurctins wy blocks. evre called global variables. These variables ore detined “or declaved in thi ectim. This sechim algo declaves all the user-deli- 4 ned functions. User-de bined kimeloms ar pogrom \¢ e's hinchimg ave generallg- cleclyyed in Hs 8 sechin ty inform “the compiler about the name lf oF funotion, its rehirn bypes Lié any) ome the _-4 data pea, of he CuncHon arguments Ci€ cou) 4 used. tupe of Functon declrration is called ne te orks ing bmove aloout buechs. aye discussed jvichdp rer. ny Laminate 5__mainO t& funclry ‘4G Every Cc progvarn tart. with a main C) tune htm Wiki main 0 Furchtor , Pree ore declaratim amd executable parts. The declarution part declares all. the variables used in Ye execulim part This section contains all the user-akelined Lnchin| that ave colled in rodin fanchion. All the sechyn- $ exceph Aye natn) bein Lieut sethizn yay be enh wher fay ae pol requir cnr mtemadinarndiaccrn sana iediescie umieciasmaieassbe esses The st of characters Thal are ysed ta lor word ruinben C__omd expressin ter i§ called chayacter set Ty (L_combinatin of dbase heenedion wards, nura be 1 acters Form rs and 2x pressims th. haractersin Care grouped into Lur aut} Jemes> 4. AREY () Uppercase + AZ i? ONCASE ) Adz 2) Dike: 0 4 23456795" | 2) Speci! chae@len TS 2? comma & > onpersoamad + 9 periyd A cared 32 semicln * > asterisk | 22 col = > minus sign | 2 9 question may t 2 plus sign © apostophe 42 bss Han sy & > quotation marle >? aveater lan 3344 | ! Sexclamation merle © > “lel? parenthess > verted bew ) > vight puenther 2 fread slash C3 ALM beckep 2 be hack slash ds ight brckeh ~~ = thie £7) kt bag = 2 Undey score § 2 vight brags $2 dillor aay HO heyh ¢ > percent Lg —t) White spaced: i) Blank space it) Hovizen ta} bab tit) Verbical lab Nv) Carriage rehum v) Mw dine or [ye Fea! ut) form feed I te .rCr lc Dut lige hlocles in 2 lanquas hich ave consbructeW torethay to lu vite aC preg ren faoh ane every smallest individual mule taal. amare knowin | ( bkeng. C fokewigne ob ele bypes :- aac Ke words aye eb d_ words for a C prograraming- Segue All k wal howe. Lived meantney these m anlings ainrat be chansed. © iL sb Ul LD CL Leements. hey sores ve used br pre-d& ined. purposes and cannod be used ac idehfiers. Thy. Lepwneds are aleo called yeserved words. Some Exeuny ke 1 pi mb vie lee xiii) kypedel it) auto vit} long. xiv) Chey TH) et le (x) suet ted, yw) extern | W) flock x) case xvi) vebuwn il v)_shuet xi) enuya xvit) unin 4 wi) braak xit) yagicker xulll) const 4 xix) shox b I 1x0) unsigned _xxt) cvbyue vx) sfgned xxtiy) vo td xxi) Lv xxv) deluult xxv!) golo xxvii) sizeat xxviii) vole Hil. i XxIX) do i Ane) ff xxx} ) s berber } x*xI) while (i) Telefon <3 Every wood used! fr C pregprein te elentily Ho pam f of vantablee, kinchint, arrose patobersand gymbh constants ane known os jdenhitare, Ther av panes | gtlnesy ben dhe use—anicdiconolet ot seaenite af kebeys ancl dials, wi a ebler as bs It charcoter “The unakrecore chayucder can alte be ited fi jue boteren tum doe Wwoyds tn _leng (den k'frer , The rubs for namtng idenbibjors ave @) Tt rust be combinalim of Loh) raul gee beyiy wilh x lable sand Aqls ane) b) Under seore 8 permilkd behuwen bao werds, bub white & vod allowed, “OD Only tock “31 chavo ter ign lean Ls 4) Keywords connal be ued e) TI's pause sensihve, ye uppercase om [rworcase leHlers awe no} mberchemea, A partiadar lind of dale (lem as debned by Ba ala It cop deale wogrearnrning language the pperbionns Lut zn 7 perkrined on tt Te i nin - Tes ae vrdinne Fd ecko pes jn_l puro, lg integer : (it) w7 cling pod (cloak, charatler leherand wad. Primary dala Tena ane ategqon ‘nh hue bypes. 4 pe ee oes Lock) #) Floabing pe! pe_(Floa ”) dube- oe vi Loading poind Pye (double) x) Charader_lype Che) ) Vaid hype ltd) Fieger ae EE numbers 12. non- achiral nuoabers. integers vewile 16 bit of shrarc. 0 hag aes Yonge WSS of 1» Ge ins integer in. }; hort integer C shor? ink) aun ‘hu Dilger bong in) an nal dlc! pat de acl ce eda ak iP ahi gece -Ie a Elaling patted typer ane Preclinal tea number (iz. eu) ave dehy) Cb hesy word brah ‘Soe ndbahan LAL e w57 ve 4 bytes) of knee, wilh 6b desl a preizion yeni pata, Labeok dype Coucble) hen ph, BLU Mey. protcled by. L022: phe of ue} he tive dahle “rum be used be peline Pre number A “double daha kipe used £9-bikk [8 beh gunna @_preci?iim ot (2 dea ik.” Tyee ave Lnamnas debe prebisien nunrbors I; evlend bre preuin fulap Ll fou. m bewwsed which uu £0 bits L0 byte) giving. de dens of precisim —Dhaweilor Type Wax A singh harater in be thin {2s a oh, NEL Lay Chalten wwe Showed pn I bb C1 D. é Lig dale 15 char, The guider signed pr signed may he used wll" chow. Te” unsigned cho has values iii a belweeh 0 and 255 | The syned char hos values a alt 2D The conversion chore cher bor le Lype 3 Le Ln _cheractyy Lype character represented by _ Tan ASCE Ameridem Slandord C1dbe Lor! Tabovrabin — Lnterchomse ) numbe Datemudly. When a character; 13 displaded using Phe convetcitn chowoc y: Twill deplay bo TAs value *; woh it I i dp lat smnuerson ¢hoyuoter ¢. Patt igly. + The void Fyper hos na vehiies Ths “18 usually used bi speclky 2 at hinclin whor 2b dies nat rebum aang “eal fo Lhe allie sone Hina, relive tuetncstarainsara dessa C suppark a fealoe called ype debiovtin whi [wes users bp dehre an identibier Phak would represer an existing dala types The bypdef stale) ut wed to Salve new name 4 tn evehing- e Lt allow Jo wers ba debine new diy Ly Yh are 04 pala! Ab exiting “ae Jypes. Tt fetkes the 4e v ria Eype del float decimal ; edo 1 Dobe bypes hat are denied bom bundumenk i cae rolled derived ceby fy pes, Der'yed daly pe (types dint? creak? a noo dela Dich insbea? add sae fen tinal We He beak dee yl Canslernds A _coruant i a epee beak doesnt change. daring f he. exewution p£ a quura, Lorstand- 13 divided Mike wumerte Bin) phejreater rortlemls, Tunbeyer and yz think Wis jn numer corsland while havadeay _wund brim combunds 1): tnto_character enslumd by pee u T Cons bande etalon, f | | La FO] [Chonceler | | i corset | ! Le ft {emilee} [ bed | / Srngle_] [Shem _| [eweshent] Lt ha yaeber [Genghond Lo i v6 3/ ae hi Lif assumed ta “be posihve. Me caminas or a ees ae Hated within Hoe integer » Decinaal Integer Consteunk 4 rcimal inlegors comisk af a set of disils, 0 Hows 4, qrace ded ; y aun = or + sign. Hove _deciMal doeynt iyngl i] Facial number, it veprerends nurber Teawiv We 10.) for cnample: 234, + Joe= 678. if + Dobal Tnbeger Ceushunt Cosel An coe inky ashe consists of amy combination af _digils ck 0 oT wilh w “Teeding 0 (cere), fr hie : 7 0, D456, 0669 > Hexadecimal Integer Consfeads A Hexadecind Tut: a.enr_can lant _camisk of ax combination” af digits fom. lod and alphabels AY CCD EL wilh leading 0x ov ox. Fy exarple 6245, 0089 Read Canaben dE Real Content ave offen called Aleabng Peink Cosas. They in be written ints hua ULaclienal fy i and exponeibia) fm, | | 4. Fraclionad form Lonshands 1 tretional ferre combends inl hace. ab beat ome. Dat and a dezimal punk Tf can_elttoy be pasilive wy —negative but debeut <1gn is posh. Commas wr blink peter areal alowed wing youl conshayt Lacexomp le! 92.45, - 42.54 ele awe th faalimal lym 2. Expmenhel bum Oinslants: Jn exponential farea ab repracnbalin He veal covalent ka deprre ny dn feo park wh, mant>sae exponenhr Th. deaths belre e' 2 called monbisca and abby Riallg) er, Ze naantzca pork may hyve a pesilive or negahye sign, hut Me dabust 1 posite. Be erpoent rail have ab Least me digit asliceh com ‘h, her pail or negabive. fer_exromy Je:- o£ 22.1057 -2.se-5£-2-5% 16-5 | Ql.e-g0 4) x 107k] Choveoker Conskanls A_chovaeter canslint js a dnyle_chepetler alphyhek a digit av @ specleth 9 sywabol enclesed writers — hag emule mark. ‘Dag Ihyeeler iy a ly \ I Lenshanke Poot i wae. lose Ss. : f thes. T Lb u nn be Y, al i oh ia : E at have an eautvatent ASC Oe Teele Martell % Fonalle Is a symbdlic constant name_which is used ay Fie de aa nea ebb cpa pea b vepvesent an item ot dela imped boy th | e inlermediale_calvedabon ar Deon youdts_* nike a constant, The-value of vayiable can 4 oF o program. 1 change ders thevex.c i ~ Vaviable nam Onaef const oF Leblers, diaits or al underscore, choracho. 4 1 Same_vetlid_vaniables: | uv pal firstname | num x2 {| Some rnvelid varia bl les LWepedl. (tole) ZL. recde Arsh nance, | Yadablar Dezlarabina® [Le_prOcel_a declave. varld variable _is wlledd 4 variable | data -bype _yeurleh | vortaNe— pane Ny i i harekim. Ib is dehued 4: [le named, verible_ Navgeoy <= Exoump le; aie int as Mvalid (at fah; valid. | Chere paar bevels permrcese inf a= 095; Mmvedd beceuue integer nly pan cows nurrhoy wrThouk deornb)f Weed for Vorinhle Detleralin: tor ws variable # nm progzum by dala Lape amd give_itopuk a user (Piz need bor Yarra ble ‘declared means each 4 rable a te ; v le Ate gel i dita yyer according ha He valups © Se ie hive rmboper Slete.¢ Jy Lore, one define a yriable “Gt bype mt: Declaruhion of a vartable walt hes “bed Tt given He rar _p te vantible pnd vi Lype it. TF ablacales appa puke merind spare adig to te dale hype gt Ruler fr _varinble dec lorxeubs bvy fi daly keer ar underscore cvs wed «i variable ii. Kepuserd 13 _nal allowed 04 varizble i. Underscore plied behweern gharaclern bub ube i “apaces_18 54 ohlowed. gy Vatiable 15 cose sonsilive Li%ere, paar] nd Decrereen! qpeaby), -(, valu reir) Of. | i) Binary operaly Tho guest: ~ whieh yoqutve buo pypands seve 2A byuny qresalo, fx examgl + (alr) —loriuas) ek gy ii) Lemony operably: The cverabrys eat venui2 bore, Operands pre bate ws fern opera mamp tes "2." Ceomdthxnal Dyerabzy | bn ce | at baer Operskar elational dporalar Tosical Overt es lanment Qpe valor ; L 2 ae aad Depron nk Oy wala Ri Mise Queralee asp iD Ope rabor fillamelic. Operalor morale which go use er anbhrrelic operakin x cabled Aris rahe Apsselie : cnsharctinasterotinsiirnebyathcal mises Operator Mecunive + Addition” =_ Suh trachen * Pubipleenen Dinision 7 Medelo Diasizna( 7a Lelabional Ooeralr Te bina. opprafers us hth ave weed to aap Compe, i fuso teninala entender heater Qmitlar operands bi culled £ labrmed Operabr Meayn xg, Example Less Head aebh Ope valor 2 a Grealer kan _azh — Lae Less beam ov expe) fp aczh 2e Copabor “0 ex exyeal Ia a>sbh =e Lgual ty aezb Je Mit axeah Jo alch The operably 2 = an Le ane_ alta lunesta 0h epusly —_Poralyx Arillmelic opexabys awe 2 bypher-_prtyrh wer relabrrral cperadyc. ’ a Laqral Opcredas Lhe pelos which a ged Es com Xe ar evelecbe cartel wr) xelabimd ex profi by pabled Logiced “nerabyy. da ah Nap hred grevabryp vent be titer Bovbin value (1 oo) o expession Pek pide [eraloass alete. kG log ived “AND HW lagized MR / Lig ized Not G hue Lable a 7 frarb | _allb Ja ‘bh | a ea 0 / 0 i ! | } 0 0 i a ( i i ] i ! o _o | Assignment gperabrrs which The bonene dperalors used [a assign result gf an exprosion a verble by called assim ord cperclors Me meslh d_casigmenul gpordk dj “le'. Wher ws nnn J pote Lied Teles ae Operecter Example +2 ate b [ azarh awe a-=2b aca-b #= atch as a¢b [= afeb aza/b Jee atch azayb Inevemenl- and decroment- Oporabar The Gperkey with &; used be morease or decreases a by _velue 1 &) polled increrwnt end decreme | opoctry repechvely. Tn alio called unary __ opener. YU v t i ++ variable prel mevermert i variable +4 peste jneve raonk fii. —- variable wep fr mcrenceuk iv varrable —— post-he morenonF matte eee a ? > Conditrnal Opmaly an The Te gpgoatae ved "23" By knnen a _cendtronal ~ gpevaln Ik fake ae endl tho _terory ~~ " opaaton The _syvfon £4 g Syntaxi oY 0 values expressibnt ? ex pressit 2 | express 3° I+ wat w tt-ele. Bitwise ope eraksr | ‘The. abilil4 fo supp? the manipulation af geht The_bik level in "C jy ‘called bihwise operator Bitwse operahrs aye weed fr a valins on bits. Bitwise operates ‘an opera nly integer. Me alos are given below; Bihwise Opercdy Meaning _ by bwise APCD L bihwise GR x ave's complornent let] chill > Right sli Ft A bitwise xoR *Sooctal Operahye Lapel sine spec opeabis suchas camma opel. ize apevaloy ake. (Comma Operatar tk omc aperabr an be used to lin velakec! J xpressions “fegelher. A comm linked list of expression 3 are evaluated” Prom lett be-ridat_ond the value at the right ost expressisn Les value gt Ho “combined” expression. Tor exoraple: n3= (nt=50, nbz 16, nt +2); een nee een ene Ve ES ESN SA Pra Lr bee bei sizeck_Operalor The geek nperibr_1s used with ap aperand fo velum bh rulmaber_ab_mernonp bybes “} ack EZ) in_pripzany mepany. Te_operdsd "for sizeotl) operabr | mayb, lmnstent Variable or a dela lype qualibrer. fay Se exar ke # incleede estdio be #melude int paint) et st I TY elim nt oy 4 print f("" meron allocated byles by char ts _/d,'sizeot (a); bO; velurn 0; pore sieern heel = Qoeraler Proredence and Lh soc ob/ ky : Frecadence: = a aut a evaluation ab ui Li ali wn heels precedence Cinteyer al eee shes fone at Daae- leads Tc apoohe EA r revel of prec, ee Ce Ld evahiakd Los! ard | _ hen operchy of nes? level Associgtinly: Tr — fp ocder of evdaalion L gperetar wi OF precedente in an exprescion, ly on, f Mae sarap, predence are evel abod leor forva 'ebt bo vhokb! aw be ban (ris Lb fy let’, depending Gy Td /- Mha3is bere ps Me ac ecbii “ pxmerly of wi syoriby. Precedence! Operake|_Descrialon Associa handy Lewd e fee ee Prenthesiz Leth be righf- cl Array dex . 2 + | Unany phes - Unarg rine) tt Lrererent Light lo tebe -- Decrement ! Logiced yor | cs One's Complernont- Jt * Pataber vebrente | a Address - | siceof Size of 7 bj | - Uteype) ay 4 a | (ilbieesieneenepeelintactee ac ila ill ii al i | Saletan Fe | - Division left bo right J | ———* (odeehes | [4 Adi, | +t ii tan [ LetE fo right = Subrachon 7 vip [oes lett shift leH bo vit a Ad shift He leas ean | os 23s Maaneregedlo | Lett lo yight reaber Meow J >= | Grealer Jeena eeudll) 7 =e 2gual lo Let} bo riyh fe Not egtext fo g Gihusire AW a Grhuse rok { Bihude oy | left bo viglet 0 & Loryited AND I f: | n alah aL, eal tena nent bets) sense etlnte loeb Loreal wl Contthiowd expression | Right lo left 14 2 A iqnmieul Qyevalor, takk Ip left homesick :amlensaaremdonenthe~ hey bem 45 7 Carnma Operator left fo vac Bode Lgpe_ Conversions in Eons mixin mabe dit herp, ~ — dea ft a singh pea ip uch spe pared | _ane_dater fypoer mau conor awabor ln wession. This Lind of con ae allel dale bye conversion uthivh vaey orcuy Ppl or _expliciy an L In, hesthy Lupe Conversa? t L her byes of perends hap expression are compalitie, blon ( will perlkim te by, yonyorion _puborrabielly. Thy typo b : aah, ren yersion ts bnew “gy imp diotl type renvesion, ' I 1 alt 5 =a = os ae L : i oO Ie double + 4] “ie [ bteat f 4 unsiqued [ong rr He Z ee = [int > = [Bhort [char | = welt? Type lonverg am, le type conversion whore ae ail ; converte df. hocellly Y cours Yaa Dy He ~_tyger hinge is called eXGh2it bape coniersio®. le -_gereral lam ofa cailrgy © a (deshinahdn_ ype) Expwsspon 4 exw coup le Pho = Le (mb) 3:3 38 conver lad To inbeperby fun in a The vest al ath B convorled 4 vateger: | n4z (mb) (arb) pout _aend lube Uperalzans Dela lope and Vubopeh: Laptt: i Thy a pues ab feeding, varbering debe Brn _inpul_kevice s Dabo prog rare proudes 4 Cok-ot hyblecin Farell Ceo wien ype and (eed tt hte progeats 0h per equi , dudbput: Th ps a paces al Deplaying! havesterng dda _m_ screen, prile, poy Pah. pvoviidel Zé beccle= in betractiared, Track nth yegurred dale, L The in ut bnedins are beastbied into bud ie g firmradled humalinn Lil Wale rratled hexolm forvnattet! Lynckyns- I ~ Eemalled Rinclraas_cillnw ie inpuh _aubbpud b brat _pacrtimg f_user'S veg east ~The 2 ut fuchom aecanbl) Vind ee cubpuf funchor ptinttl) are frnikted bunchon ’ ; =. 4 fecweted pul yplors b 23.0 dada teat has been arrived in a pert bere» —froeds The butlin Lynrnble gett ep scalp “am be Wed be arber sin pul delby tle Hee cess e a Sy inpuk Ly Tle petactal late fh ~_ Stamp () iy; : Scan kl rrrbs/, eg a erat arg), og 7) —The_ronbol hing raha b ld. kypredt th uday He dala iy ly entered The engtiyne nha ge spectly lo golhess of, Labiord w ‘se MS : L be a cael pe, eee ; = _chevecls nah eel y21¢ e Lo D air? combering aul brpl, ery, he Lied eS abi eeepc —Libtlespace chara or] Loring chewerher] Li fp bf wlll convorsirn, hevcheyn GW hesepace Choracters [Oph DL seanky Ll, LLB, Lb ips Lert a whitey RG Aarzchey in onto, stig. tt yeas habe best Anos nok hve Hh, con secubve MOND Ce letree olay 4 U |e Hh at 209) = while spuce ber 2a ba Woe fre li bednay rather Tbe 1 ich neny clopetey, | ave Baala in seal) Kinch by Babe eat ina cortdiy portlenn ya East oa iii) Feald wid Uy [Optimal It ald widly specites Veg poaxion: un_puraber of cbura vead <_tonkeiin fewer charachers than specitied fr id wid! but number charathas in Ve excheal Cnpul dala Leva _cuvarel xcee/, spellic, Lild widle: Any chevacher, Metexceeds Heo pecthed field! LL MEL 4 hte _will be skipped aut. Vid Conversion Chanaeher ? [ The convsior_chevacler 2 mall im bee basis of hyper of variable. or deter ibern b be 4 rout. Me "Lown wed conversion characeins pine: g ‘ Conversion Chavecber Meoming. f i) PA Lead single Characler 4 Sed bead a decimal iabeger i ‘Le head o Heabig po WA veleoe i ae hee 0 leah) wink vedio 5 of hoad a tra biey pork yedlew 3 Lh ead a sherk mbeapy i hi head u deciimedl, hebadeciomed erpoclel' +0 Read an gebal bere \ ts Lead shrybag 7 { by head a hexade ciel (ythen, { EaHled Oda | abled mitont lunchors are wied be diply or shoe cate jn a parhizelerr specited 4 Gamek” The. pimabll) 4 an erxampl a Lr, oulpll Lee bercliom The general bra ab printtl] oy pall "corbeol shiteg " arg) org 2 === sgn); 4a ToT 7% “z lene fang Peep cist a ay ob Le allowseg dp aie Lek wall b, sol SLIELL dy = i Comal spect alan, fal pine Lhe cxzt cabipoh = byoak 'br Liphy t “Lill bape segzete ef cl fete 4 as bo, TE and| Any combbinahixs of acters, forrmal 4 Zc1b cay WN and escee er CoN) _ The canbe shang x Jtee bre thle LL Feld wil IL prewsion] comesionr barre, Flags £OpbromotT# Fi te x a A’ Leg id LeA: Volek DELETES. 2G. _ LE wath A’r! Lae bs used bb hs pleeep stgi “BB peceke ech sree nurrerical deta pera, Ag! "Lop 5 wed py pnd zevhe leach Os by apezur 1 yVhend ol bach 2 blanbsiin night jughtx 4 ‘Lert _twohwse “rabrivutia widlhe 2 Jerger Mem { Vee dela evr, 473 wed wilh lhetlae | he b_en bree ecriezet pork np babs a 1 eal nk turbo ever TA tt) ot whole newbs, Lidld lilo (Uple220d{ z : _ The field. withy is ay mbeger whith svecthzay He rminiure nunrbey pf rlecavacher or_dinth bb be dAiplheyecl po _crrhpil aperedrox TU Ti) Precuron (Ophonad) precision is expressed 1 dbeger wha izle specthen pnevrnber pk digs fa be as flee J after de ecnaal ark "rt blooLag. poet nuvrber, Ik begis Th perfil I~ Ww) lomvens/oVv Chovacher ONVES IDG character kr pnt) wo hex sirai her fp Meet of Stow, Oo. Untornatled furcbDrsi Unbrrmetted hunchsur do nut allo Ho Ly. (a veaid x Asp hey cleta nv desired bral. Take hype oh Librovag” burch ove) hes ically dewts wilt Us iegle chavkcler or 4 shag Oot Aawar bers The funn rows gelcharl, whorl), gobcl), pubs), gle), gebelel), pubebt) ave constde A 2) umn brrvadlted feumcfr0n. ms RES ES EP LD aleord and pudoleatrt) The gekharl) birchim yeah a cherracher rrr a___stanclard (npul devite Syn ban Oy: character rele = getcher O- The pate har burchon che, letgSs a character A Ae teavadarl atlall Lareg). i dene DY! putt hear (charachor— vartable/; Joarlrethacedenatlcodenarisenaleantconas a! | GL pak, ake) and abl ‘ The funetins J) ar gehche ) veads 4 smagfe “blacker / Les typed witrod treyJgorn. j bx Lhe enter bey 4 bit ~The dbbrente . 7 cbuwetr Vary 2) Mex! whch O yeads bee cha ‘ 2 hyped can Vegrk Ae Pose Yen str2en wae He 9telel read VMeoY charadler and echey Lee SLVCEN, Sy tay: chonewbey_veirtabl gelehl); chemeacler_veaneble = gelehe (); Le bechroa-s peel) pnp & chivewles aly Iho NEL by Sey labarrs tbh cheorerhar. vearxble ): Py Gii)_gels U ar2S peck () he abs C) finches 0) v4, read «x she, L bext - combing whilespags, ub a Lewlorwe chasatlor 4 _enewmbored ft hw wt sk _rslibe Synlas gels 49 — veritable); The pukt() frhon is ised Jo dephe he shri om "Whe streop, vg o Syrtay: puklabring — veri ble) U 7 Soph geleharU cond cheba 0); # include cstdin.b2 # include int ranl) Zz “char gender; pein Ener gest Wor Ei: gendey = te Laur (Ii, Grin FLL | rv gendet 13! : pubcharl ‘gerrclor! gete hl) velum 0, i gelchll 9. tehel) enod pubcht) # include < tdia.h> # include int raaint) £ char chl, ch2 printh (Enter dst charzclere ws chte etch); a) pink UErter 2rd characker. (J; 22 gelche OQ; feat La lst character : J; pukehle a da z ae Oe er): bh lth gttes Q; “ wehurn ges) and pukl): Se H lrde €. by ho Hivhide econtyh= tat pretin’) as he rrewne [20]; PULEL bnber baer vrame.") Pee: als Cpe De pemtl £" Yar narnedy i!" J; pitts ( nowme): tet whirn 0 i (onhalstabemenk hich aller flow of DD pagan are knnorr os controlskatemeont. To manasa He work Leo ab progpeura ve_wse_conbrof shale nerds: —_Lrnbe | sbaherrells ave lua fypest LD decison [Making or branching, Dlop staterzert or repeal or tlerabive, Lecispoen Mating Shalerroulss The decision making stabermenkt test a cep dh spn aint ace int and alow vce ctaberrats on bab, bass Ff veault The dos Th he fos agellh hb decide} whe fuer speci tied Shaken: recited or potas knoe a4 eee a ng sh ferent. Decizton mat ¥ tf stabement + ib eke por it. alee tt stebercont + Nesbed "F- he peel TL skberrart An tt statement is used to conte, fej Tw of exzution ob skitements. The it staberrort hrs evabily, an expressian and Prey, jt execuhes the monkeys Yoek th he value of be eveliabed express iy true. yes if Gest_ ecoexpressian) £ statement. locks a prose ymmientimetneernt til ane a <—_—_— ——— A» nak ~S Wated il sbabeveorlss dened 7 walle ~~ ln body of rattler pt labored Mtb eed Lt Glaterront, ut Tare LLexpession) tL Lexprwesy on) é tokement ; teks slitemarbst The ib-vke skhevwnt arr etteesbn «of fe simple th stederunk. Tt iced when Have ae only we possible achon crbines)- ave hayppen when ke tet Lordibinna Lt heute, cand ba deer take 3 when Ib_L else prdean?. th (dest expressrar) £ pue- block slalerrent ; alee Howe -hhek skibemouks 2 LAG [hehe terrenbs stall alsa h Nested if. eke Slafement: —S—=xz":: joailar dy nested tf chteranle 0 be wntter ineide Hw, zeta Leche Lay Lilled need it else Syntax i IL Cconditent) tf Ccomdi'tn2) < Skitement-4 : 4 ase Statemont-2: wi gi ebe E Cconditrm $) = Skedeninb- % As ster shebenwul- $F Lacey pps a 4 Pwele rf Stedemont.: \ An tb. phe sk ieee cae when Lheve ae wave fan fur possible aby 011 he, best y oN an aehiry “Ct? tes C1 Zr 2 L) L08 CFlesS C172 IEE 4 eek luation th. else ff. else bretebeire oy LE Coorrch bra pf) . La lernenh- 4) else 1 Ceo ogae) lsat 2 HD Has Beg Wd Hy Mp Os se |e, else EC conrdilem 3) ¢ Slelemont- + é Is E Leand horn) £ Stedemuk-in5 y else ¢ hull - shebertout: i oe lay eA be whieh wmey or nh? wy parkiwlar comdihan 13 sabshre When an tdentiol ia ih be perlrmed lyr a number_ok hiner, Vhon leap i used A loop blows fo execute cerlerm black of Shalerunk repeatedly bil a condjbrmel exprschyn 0) Lue. Y 2 lor- feop 2» while leap o dh.- while Igop far_lovp ? The_her loop alles 2 ex vecle black oF slaterments brah ynber ot pines, When Ure pu rmiber ab repeliba 13 lenpen in aohance, Vhe use ot bys loop_will be moore zed. Tees, Mus leap 23 also Linu a delerminate or debt loop, SyvilA Yor (oncafintab hiadecbron; fet. condrberr mocverner or deore ment) £ sketerwuh Sw body ot loa Z ( qrunker_ uttialecxhom be delemmre Hue value last. Folk wendiion Ly waed be sch camden lith meke bepin pope wi Top: SN Son bee: wy ke (teat. comdiyyn) 2g ck ea ps When brapeceaey repebibonn is Anot bp BUM? Ly dane Gt L sitheble All tr lop can converted yy, etek lap. ' ab whl loop Syntar: do t 7 tele val ov bady af hap: while (test_condibepaj do-whik lop aie body hist wilkerd phapleng omy. condilron we chithe 2 bal.condthan Wa tervaleg uw hefhos He bydy ol lap gh be executed lr_next bing orn é Mence do-vh b trap exectes hp body at bev once even § Lw condbon D. at Di'Clerence While do-while while lop 12 enbey- conballed | sell esp ip exit contrallalt tak cmdibor 1s loop te, the’! body of be Cuelatted bist avr AS body of lop eS uted ont IE Hoe Fojp-s 2) The bady ab Vee lop marek: be exerted at all if Ye condhina 18 ned sablishi at fle very Lusk ablenspl. ee backy ok the | cop 1 T's execeuba7-) ed “Pref hott ch cleingpany | condihan_gnd at Pe en/ ~ ot body at cop, Poe condibin tL evalited ber repeuhor’ _\, ot next yap. 2) The body at lop 2 i alureys weccbed atk ‘ least Onn ke { y : qf paler lp pye_t) ro al al cat be a Hoe teap cenbenes avatar s sald bbe nested wit haat pl ee nurcber Liltie rngbler (09 oi ie tat hidlizab yon, bak condor, merem t a (decverent) —elep { & (chr. pa bialrcabron; desks_pacr /decrerrunf) | £ (“inner \ wy 5 C 4 1 Stbereubs ee ll a nance ee bese rembees A break sbtenwud he break bermbul Pe ely ee a lalaol ie Yar, diekely Lllawng hep. leap. a a Erat amdthan b&ernes fuleo, butt Lhe Lap _k h ke heriualed Daskonabty thud hey hrg termmahon condi han, Yeo brBuk sledexanl Lz Le ah synteny) £ lard: bev bmsaks Sseherrenf} Break ; wntiute sbabenwnh: The_conbine shaterwut sy wed wher we went bcbg vurning fle leap ut sto, Mae Yrder AT Heo ca Wa A hide ope urs, parhriulecr_rhesalriaa 1H 4 LEAVE Yeder 2: ff 2 body fr current piles, eaayegh a Leo Syntert ; Contraug ~ ~_ gh sheberwonh: Te aahs sbedemenl 2 ced fp al warned sepuence “gh program prgeuliDn by iad bepgcelly pramsterm coalal fo som! ther. al Pol Pee “proqgyerm Uke gab datemint panspors. Ye anhalt thé labeled Se lerert some eere o Lhe purrent furchon. synlax ler qelo stalervonh 21 7 Gato lab; lore ji Lecbel isan entiher vyed by label bbe buryeleladerant fy white Pe ponhel walsh ££ bansberred. the brrgel skulernent pay be labeled sn where. W 2. SCAVP OC. 2OGLEIPPD LOYN2G yee fevoy) hho): slabercw1ls,, The gabe_ statement com be ceed in Unerng siheatrang : L. Ta raul; branching aoound shatemonks yr qraup of baberonks mde! cerkann condi ban. vi lo jump __b the ond ob a loop under corbin andihavs, Yto by asspeg” the vercidor at Le_loap durieg Cire!” pees. i. To perp conpletely wt ot bee bap cinder cerbytea cord Irn, terre, neching M2 exeutrn ot a te, swith shubenront: When Vem amex avalleble an tathe hctine ans wer ly chease a shiberront a aura ab beyniblies ; number of a tt Hm 1s be be st ipadle ol cole, switch sliberant jy sod tus a sutheh haherreen! Syndaa: tlh (wiricble x poprescion) C36 cotsecems hart lL} stkehervent breathy C82 9 Case conjsle2: tatemont 3 rect le; Cig Ae Lecelt-, sheberzords ; 4 Write a program fo ilushehe tre oubput af rolubind include # includeecgniah> | | | : | | tht mainW) § int.ae lf, b=33,c=1t; pals (ach 21 A Mb arb pd", ach, arb) ] prinfhC" \nacee => thal Ib acce oat aesc oid", | asst, gest, a>=c); geteh OQ. rehirn 0; 4 Oukpube geb ad ar bao aesc ot aera ol grec =f WAP ty ilhwhake the output o logical aperakas. # include < ‘dio. h? #ynclade econo? int_reatil) wnt az Lb, 25, C2490; prinkl ("ln ach Vaze dd", (ach Ub acc)); print k("In_azbh OY bec dtd", Carb 4¥ bec)); pitt (In aeb i ace Dtd", (aebll aec)); prinlkl"\n arb I bec D1", (arb il bec)); inl£ Lily arc I boc > 1d", (orci! b>c))3 goth Felur 0: 4 Tr F — 42h ace 30 arb $4 bec st acb il tec 4 Geb Il bec a7 a>e UU b>e 30 aml at Usraprenk O, a Hinglude # inlade ecaniy.h> wt mein() : int a= to, be §; brea; bz bea prod ("be Ji by; Gee; whirn 0; 4 Ouhpuct: bz 16 Example of incre # twthide tit rogint) fe int aztb ptt ("a= hd \n",a); rind f ("4 = 1.4 In", +44); poll Martd In", are); prndl (laz?d \n"), a)s pall l" gz hd ln --a); wad decremenl aporalers polkas dd In", a--)s mnt tC get d\n"! a): getehd); Sehr 0; 4 Oout: azt0 ac ft gett ae t2 acl acdh az 40 wae Cxanple of (mdibimal Gooralars- #intludeestdioh> # ingludeeconto.h int rein) oo ay cece imcint ink vbr, larger pull ("Enter lwo nurcberi"); scan kl" hdd", & rl, &02); large nt>02 2nt ing; prilll' The lorger number pp td", laraer), gelehl1; . elim 0} ee aemerer aed 4 Oubpuly Enter numbers; 5 10 The larger number £4 10 fot *pieladec stdin tmgludecconta.h> Mak rene) int _nle 80, n2= 12, AND, OL, X0ks AND= nl & n2: OR= nl _ln2Zj B WoOR= yo) 7 25 poate (1 AND 2 d\n", ANDI; . ponth: ("Oke hod \n", Oe); pravthe Ciyms (d \n", Xok)t ° gekeh U; Polearm 05 02 0000 bol) 2010 3 122 (0000 Gobo 100 ANd 2 0000 0000 0000 Oubbul; OL = Dbjo. goil 110 MOL= (SBD oll wd Ald= 0 | o@= 62 | xoez 62 WAR fe the number wo) negahve at tnclude estolyh> 2t mclude etonr.h> mt rant) m yum: prnntl ("Enter anumber by be tesbed: "J; scank (Ld ", &mura); tf (rnume ol prin ("' The set number 2 negehye'')i getel () Yekurs 4; 4 Meshed cf Stabepraneb Exciraple: har Chl; J int age = 50; hia gelchU; th Ghez'~') = Il Cage >40) prinkl ("" You ae rg on Cl man"); “Lib... else slalemelub Evample. # include # include e conso.b> ink main) $ Mb nun, xe mainders pin lb t Enter ao number.) seank("').d', &uura) rermincey 2 nur). 2 robe ("" The member 1 i ee | Nebel fo se stabemonk emcamp le: mk reainl) ¢ ae TEV Ho prinlh Erker 2 Bmba eV: 2 saan ECV. Shed" bni koe, Une), 1S C viene) = SC nde n 3) 4 punt ("' Lewees} 2 fd” 1) else : panlf (" Domest = J"! 2); 3 che, £ Cn2n3) prof (Largest = pd" nd); eee poukf ("Largest od" n3); i) qeleh ()5 pet a Tih ase tf skahement example; arch; vinkF I Nn enter vaweb:"); if (chez 'o') prt (Vn wlewvauich 13 a"): else tf (ehez'e') prt ('' \w vowed 1s ¢ “) else tf (che ='e') prmlf ("lw vowel 1s 2 '') elee tf (ehz= ‘o') pombe C''\n vowel 120"); ase tf C ches v')- pom th ("\n sector gue! 2d ul) | | Miser chemle~ ahd cele se oh else ~ ponth U'|n weavel non-vawel chareacher "J; gate 6): rehum 0; i Pre _leop : van ak fo (120; jes l0; It) pol Cele dD i # * wlule loop example : ont tak Hinclude estaa.h> # melude econis.h> ynalnl) Zz tt ab sur; hay nexlTomes next hme =! 9’; while (nextlime = ='4') powtf ("|nEnker hoo number lo be added, Were Seanf ("Idi d" &o, Gb); Suim = ath prooh Pl" in Thecus Ned cin); pan HO" @De gace wend bya gm dteor bo rr bere 2"). ee se Ct bers fr exih\t"') scan tl'' tac", & next Tome ); i gekeh0; rehura @ x do-ushile (oa exanaple: clear chy do Ai the gelch(; poontl ("In you hyecl fc eh): pot f ("do Yeoruct fo evik 2y ha"); 3 while C7. 2=4'); “waled Loup Exzrvaple dim ludee stecly ho # meludee cony.|> nk rain £ iat br s2d; ie= 40; ir) it ber Get; je=lo; jre) ¢ 4 prmbkh (dtl 2 hd "if ivi), ce prmtf ("" \n""); 3 geteh i velurn 0; i Break Example #inclide estdia,h> # clude ecconra. h= mnt matad) rub i. fr _(rety ie fd; srr) < pratt" Ith 1); t£Cizzs) break: 4 getch J); a _ | pitts Seclademerd axaenp TF (an lide €stcha. ho tude econisy, h> at pated) fy (ELEC LUC ———L . ——LUe PREP ("In The even numbers born 2 Ate) oe i\n" ny tet} leznum:; jer) : i | 2 lipase) conkinue, .— pom FFE" |Etd iJ. = z 4eteh (9; relun 0; 3 ala stakemon! exc ple ink maint) £ Lak t, nent, nurnd; poll ("En ler hock nurahor "')- nbl' 1d" & num) fC url es) goto negahve; pun If ("En ker second num he gant ("td", &num2); if (umeeo) gobs negehe, ru FEl "The bith purrbers ore pesilve"); | “Feleh yelum negabie. eel Either nurstber 3 negebive) 0 yehirn 0; 4 guikh skabemond cecmple sel heen lta. des aflame eer eed eel ne # includecstp,h> include ccema.h> mk mata £ Lloak ofl, ap2, resis har opr 1 prntkl'Enley tdaporan dt \t"); 3 sean kUALLL ", Gap! &op 2); ; 4 pool (|v Boley on eperaker wnong =, + i /:\F'); ceark (he, Goptd g 1 wikh (opr) | ease ' 4's ; resell = opl+ ype i prnthU'ln The sum 1s ff") resect); breaks cose =" yesulh = opl-ap2} prmbbl'In the dS ference ts 7h" resedt J; break; Cage t#': result = opl+ap2, pohly The podscl 1s tf") result} break an a et cage '/ "3 me be apl j pallet" ln The quechionbj24.f "vere! ! ); bree fe} cle fault, petal ("ln Dnvald operat Abit) Gehch (); Ye heyy O§ i =a) 0) le po Eunckran . Tf bunchion Ls detned ay self- peclors 0 par biler Achially cevlotued block ab skebemenk “§ specthed jgh in ym pd Is 7 St a logical unit composed gf anumber chine ay a eupes into a male unt. Tt w atln J chem ef o praarcim perbroing a 7d F g Advantages of Eanchares. a) Managec hil; fy ‘b) led ee Reusabyl dy “)_Non- redundard non- repeated . 3) logical Clan Eps prance a) Eas to divs the work among pooqra romers Ug lem Types af Succhond ») Library furchons (Ruilt-ng horchons) 2 User Sehred hinchrus lompmenks_of a _funchwn 4 Fanchom Definihan: One or rove _slalemonts Shak describe The cpectbic heck hy be dene by a benches 12 col hunclrom cle brent bene I! consis Tet buch header, which ce fnes bunchns pare ike yeloveo type Y ik ang monk 134 and henchan body which a blaek enclosed _parenrdlaosis. Synsaxi Jehu _ ype déhivi bon narme( dale. by pe variable, = deter "bape yariabln J siaterce nhs; yeu vole 5 9 | | ; + Eeurchons Declaralron or babbype + Padlahion- 0 bahlipe decleady or prolelype 1s weak! gw blueprmb of a hing. Tha ~ pbaelor se wed bebre if is debined im He, pragreon ~ Lan _ceclorabyn or _prdts is pees be —podde He bllasms _» brmalon Hae comp) ler, Lt Te name of BS henchan | ii. the hype of the value velumed by Me herchoa Li The Humber and Yo hype ob argent, Vea races be supplied while ceblneg Me" henchina, Syntax: vehi. typ kinchem. nome (bypel, type 2). 2»). Example mbkaddl heim kh): + Rehivn Stabenonl-< The kinchan khned utty il vehurn vows whim a value of tab type. fr example; if a huahon has yehurn type mb ,“i} sehen an iikeger value fan Yo Lunelod fo Ie calling proqrara Te! ‘relive Ie herent eat Ve hd gh averg hunthon babe —b_reluwm the specthod value “bors Jes berchen y Called a vehi clabe met Tha bevchora has ver a relurn type, Vure £3 20 need of rebirn stake menhs ee ea a ae a Tk pmmediatels hansfors He cmbal back W he cablins progr Satter execehrg the sehiyn Sledev uh 7d ii_Th whiny Ihe value lo bho aalling Lurch prs a ra *S XPrEI Si, J, : name, lllowed P acersed by specituma ik” rent . SE ong leble nlSed rm Vo bane hy uy ‘ Canon example, ~ add la, 7 edit) with hiv argumerds \¢ called by ~ ree Lb achon . 7 The arguments appecr i he. sland at achal ast crak tl ae fle goneraf fon ot Wo bebtton Cll shbemorts are; ~ 1 fk feo hes paramelers Jak [F does rol vehi veulue, > hunchron. nome lvartable', arable 2-—)- . i tf funchen hay na arguments and if do not a rekon vale . fuuchem_ name VU. ih LP fanchon has paamentert edit rehire yale variable narres herchon_name lvariehlel wnablee..) | ) Df fixoheon has ns _parenatos hut vlung value vemable names henchran_ name U5 7 fre bemerds ome wsed. whe Bunton name and He type Enumber af the variable ‘argu rrouke) Nsbed pn Mee funchens call cloheomort muy} wmakh wilh Mok pf the henebion declarahon bferrenk and Jh_header of bho fenchan de ben bay, i) The names al he variables p's Bunch declarrechon Runchon coll shetomnostt and Heat tn Me header_t The funichon de hth re be dt heen. iti. By dehuull, avqumewde [er variables) ene ales passed by vale in Ee eee Yak _Iizded coe) pl tex valucsnl lhe agarrent nate pil Le the banc hiss Ww. eurnenke ler vervicdble) prescul po Vag borer eupresvion ore 2 evaliebled ond converted b'He bppe ol He boomed perrarie hers ob glo at Me body of Let BUA A waible may he ossined Fe value relied [ by Me bunohon, aller + Ls exce wsrag she d fesse fall sIaberat, provided Hee yhusred ype pat _a void | Funeliom favameters ‘Argurcenk) ynclion _povrameters are Be meuns ber eamouppkeabions bebueen fhe callaug and the called kinchons. they can be. lassifped tata Amal paramekers and achya) pararebns faronl parameters ane Vhe_p. wneters ajlwen_th Me function declraban hardin de bobbin The acheeal parariebers i ments, it does nat Hee calling Fuss tian Similarly. wren 2 ry he Ca} lpr 7 recieve any dete frm This bene “al huh 1 dehye aa; ° void Reachian_name ft body AAR His *, i cobegory 2: urchins with Les uments but na kelym valie eee The burchion ab Mois cabeoory bas arqumenk and yeckves a O20 wp Srnchran The hirchop /. be bask an tes nat velurm any vilies, 6b ‘aing Feuracbim. Such, ex ab Liachanr ev dehied as” _vatd Leone ban nears. lar gament 2) body ot Seer he 4 rons tm emelctamel tarot rselomar ceeds canned ot ete ve RTOS pobcnlianlage i \ | | ——— wquprenls_ a. wad rH values | Category 3: Kunclion witha ! Wn tle baw alling banchion. Akbar esas 2 Lhd, ibn aa, Belial by Dae Latent Tere here lion Lerctigfs eho) LD ‘ne 2 ea vohirn Lupe Lent largetmen Leh i body of Hao berthor j j vehi wetls2) Ditlorent!- types ob Lbu bier cal: When values of achual arqumenls are passed toa Eunttinn call by vole lor [uss argsrents be valiele _funthon as argu 1 ors knnwn ac burton coll by value, tas ech call the value ob euch achual Yoraument id jaln carrasponding Lrraal oy mene at he hunch debinition. thé content of Ma V monts_in te calling funchign are pot altered, even EE hey ae haga ne called huaclrm The tert Is. usiiog Wu sy maker lune bor neme (value.oh argumentt vale at coqguriente) oe | yest | by Retrenc. (Page =| Go this lupe of ferchion call, the address ob a variable yquprent 6 passed ha hinhm ov arqurent . rabeed a achioh valug ob variable, A bineHen 3 vy) le assling adores, In sk argumen | Cm lene prame( address ot argynient L, address. pe argument 2, _-—); 3 : 4 ursive hinchey : 4 recursive bynchion 13 one Hat-calle fp ikelf b sohe ~ mallley_verston=ab tts bask tink! a bral call 1 which does vot regvire_a sell call Thus, a burctton_t © hnown as recurs Leocban.it tt calle fy jbself. The reuurston_ip progyany ba technique bar delining a poblem interne Lt me or mae sraller verims.” Se recursian 15 used fer rep. abibie Core, hey 1 mn which each acharn js shirk in terra of wean rewthe. Tp solve a probler using preursiva meltad. Lllowiag leo candies rites} be a saliz bred 2 ti Poblere newest rorild be iviblern pr debi! Po kb Like previne resell: potas it Problem statement peed pars! include a shppng ndibion Li nue have an tl sl2l ement somebhe, thie be hinchin_b whi withent he raurive call ~ — being execubed, obtenoe the hinchon will never whom) ~

You might also like