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

Byts Week - 4

Byts week 4

Uploaded by

pxavxx
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)
15 views

Byts Week - 4

Byts week 4

Uploaded by

pxavxx
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/ 18
wien oe an ee void test) wid waing Rot diay; > Peclarion. *vint (‘helo test )4 muah: ede — Alling. ved ee wid tat © oid. Aig hy( Redevalon ane “htt Chelle at “pint elo dig) ; hallo tact ip Evay on chew, the [Pedadton will aboays Kaue vod “pion terller auome tet |ychum pe A c im 1-5 > Fao wight be tect wih sak 255; ata cael os ia waind) ¢ ie if), void ava (irk length, int bead): veil fest flatf) olR Bow eh fe By f a i Have UF int b=33 " ; area (Lb); void main 0) 5) Noid anea Cint lergtn int breadth) WaT Tad} Nee we aes : vive i= By dedaxing tn, #50 flat $- 55; vist Me amie ad 9 aes a pad of dedoon we void tect (int i, ant); can povle Aome dumanuy viable El (Seat if) Aounies which will increave fre ? ruadablty of the tnelion, Redaradion :- dentif 2 The papoue of dedvedien is int show(ls fe 19 gt shew fo make Compiler Aarey by providing 2) geen a net pelotyre information af fut Coats 5) - chow(x, 9; Gl al dat) ; fonction detmitien pe fy call —> Gavto th defn ia 1) Hast feu tlre) fh Tee: —> Foy only velar. 6) void shaw (chan lek ll 7D ink showtint)s Be . int prin) i ¢ ; yprirtt(‘hello tod’) ys 3 det Yan pitiw hee Sy doe ow Kb; ae t | Sad BO: veid fats ase B(); 3 3 ad (20 vod 20) fu); fo; 3 3] yoid. mains void main() fa; ; £10; hu fs; 43; #30); ; | 1> Bedy (¢ 3) ‘ veil £20) void 4x\ 29 Bregpaam (lak of maint) te end wc t h nt(“hdlo A}; pint Chant’); Es 2 if lp: Nel AB Eva. Olp: Helo heey we worked to we ay Nees Yate voridle wo things we ned 40 Helles ; e due 3 F Peau di enly rile Tee Naty idle etl alive Like cotly ads that js called toed >the rite shal be thw Dedanaion. tf it i outside Tat — within our wepe > scpe : Is called ay’ Global Veclerctiow cl we cannot vee thew + Declaration aan be wither aay ted So we will gt “vor. : times: Pebn srotd tom tiller andes - +. BYTE PAY 20 an) ) fn 22h | 4 We an de wid wainl) ° IF a=20; het a ai vor wain() — Vahan focal viable ge {Tint a=t0: ard dott variable RY 2) 1 prin (AA): coaler cil olngp pint (vc 3 pian eat 4 x Compiler will ceruider qb variable pinta = | anly tun Apere is no foc vob Bis tn Lint az lo; rm @ print ("Yd" a); ; | vik panne) Ormpiler calueys printf Cosy, e OT eae dp: Eror (Variable is dard) int a= 20; dadanation, # not bre sdy gdo not rune ond x We an, how 2 bo) more mika Ail ow- vere with Aame same, bt pic (vt, 0); ee Remove (int a). thoy should present in ditkoent i ip: Enoy About prevent in diftaat, op 30 2 pipe Cobecw’ alps Bcd test(int i ted y int aci0s 0 Tif 2) alate oe i vcd maine) aa me /' fy) ts — a Az20;-@ if woint) : ae ae ie ie : a= 30-8 Cat T= 5:5: aah (iyp1t aN. tat (if): ; pes 3 paint (8a) | |: 2 eo " Deloulf? inka i void test) £ ‘static. nk $=0; wa int [ros HS: HL Vay oii (ard\n LS) ‘nil main >| fest0; test); } fed); 3 a fo) ab Static aia ar relain (updates) if valve behwan Aucedine findion all +> ame function. whew, auto carnal updatelvcrin iB value. on abe ex: *s— static aul test in test tect) called stiney —Whon test i inked > dine 'S 6 cuaked . fom pert aall/irveka_ Onwetds it will plete Petes > variable 6 created and dotioyed fox every test) call Amcke Fence 3 copies of ( cuardet > Wheneva we want to phawe cre vote acs ‘h\ fnclions 4 Jame type we wre Adc. 9 Whiver we wart to weinlin an individud copy tr evay t.+ thon we need 16 go toy au Veulable . void main() A aol bile (attg=3) nt acloo: Ap? 00 Wo (00 5 print (a al Paid wang) +0: int alo: aoto mide; ot A=20; inuide : printt('¥d al 3 iny clgent ; y Ne ee () Static int ececrt; iit deen secodl; iA ee) i270) x In tee above ex — Clgcrt is gba vottae = eeeer| jy alic lead veichle — Extern- ould of cee void tect() | Rai + aah 7 3 pie, eal " int 95 Pecluation for + aeertl and Lee0 onc atl vote fue Vote 4 weand cc: Pe a b avoid vor > reel) cet) main) oft Hrce Andie. YON abeOr. > chert jx Aboud aor all tris Be : - If 420 is Wicked 200 fies te fas 200 voll no ave cual individuedy | abel); (per fv atl) But only one cecerl | Hest: wih jp Aared aces. all a) prnlrAeg)s fynction calls Coane as thou). Sal eal it ge void abe Defaut value a Ea; ache youiable as ay A. vod main) plp:2 hq: abe; Beit: prio (iq 9); a0 \ pon a (id tea VE th gy ba li "pe Evor: Gis nt | veld abevoe i “4 bt: defined ited “vo main C ig ByTS PAY 21} eid main)” . Extension : Te Know the spe die 2 28IO | test; out file_extenuion aan ae | ane Data ant (*hel ‘ Linux\Maic : 0 id ae ae of i |“ freatale Exteadony nd a olp: Enor {finds ae +4) hex Gee olp: Poux lca ref ws calle veld maint) fire) : , ere Pe Wg, Janpikc) oa aa PF Wag); Comgilation pl 1 \! tel | VCedern-c) Wine Din x Comper: ai proces oF cenverting | Linet eee " hunan vndoukardable code to ry Tes At ovo ot. anata ae machine undeutandobe code is called -— é i cowrllation: Corvptley bp aerponuitte — Crmpilation eur ‘ fv the coriveuion. = linkor evox 4 —> The time takon duaing complotien Rusrlime ovr ‘ is called crupilation time- ‘> Legieel_ovror a — Durin E oer conriler chek “xCcollion ove ovy for aytax emnant ae if ‘Izton gots Linker vail na ced | cen an over: cde 40 exeatable code. —> Semantic “oor 3 To check the luk be thee ‘Paving compiltion if cay con vostiabk aud vaiiotle de. ube to convert any ede To duck fhe Wink blur fn | Machine Code thon Te wit be avr. call and fn defn. Sytax : Checking wa i a & a= 24 a z ieee ae i oi) ei wain Wed main) Linkoy _ee1er ¢ patos tg pti in g 1 link ce i eG lo p(k s rat 4) in 1 | at 4 yetiable defn then lr over i a eae ig gue tched: ene xl: a maind void maing t Tinker over in In vad vrefinel | Stem ih g: an ity Variable Wage | yefe even bo&s' im | petted ‘4g; g=lo, inl (Yd): wd wind) |Wredvle xxe i if $ ant Nindowa: Undefined — ee ci q=20; a and —4 in aie ec 3 4 mai.) ‘wid maine) EK 2 0 ? E wr to 4n4 Line: undetined veloma. “elem it tem ing: taney to ‘east’ madule Prd” * or awa XkrC. fey Wthus: len) ay = Ta Ta ae test in module x-e void main k 3 ; void main Runtime evtpy ¢= atein int 4: ‘ater. bt pal Any corked evert which print "helo wink will ferminde the program abiavel {0 int 4; 3’ called yun-time ovter- 25/0” pe sock over flour Logical ovr Freed of olp b diffevat from HE fee wank 4p allecle mum tUnined ovtpvt- ° He al we have to intialize,, Ex: 4>3>2 (Ex: ob: d) ; a ou 372. (Fx and di) tos howe int g: nt g-0: = Bern Sorage claus Pside void main’) ye mind he body is erly naark fev Suit ya A, ; yd" A dedanakion pave eee nEslon abide the Jedy me fale tncant for aun declaration ov avto int g- — life and scope detinttion ut nt bdh ab a Void main’) = hat aut ip + Wme- ; ‘ inHg “whine ay ae iy at eee } dlp: ce stoag. claw ‘avlo' is. net allowed wu. ‘aol SHorag, hws autsie baly: Bedy is apected. BYTS DAy 22 WS C22 24} gtk. Adault Ainge claw, 4.4 varie is nav TIF = fal — Tw debult Aroq dows ¢ boal ware » al. — the debt Ahoiage claw. of Gickal voniuble’ b extern. i a exin nt 4: “nt eee seu vod main —- void main mt (485g) ‘pata Op: \inker Ene body meant for defn. Arlo wonge claw orks She body ty ovr. dre? Stern int B=o; ‘ Bait eae =poo al y int 1 ew. aco int g — auto int a-w; or 4 avlo int acjos-7 0” iF acto: a | tag 27 28aM int a elem ‘whan 7 a | } "Freedom 0: (oH 3) im az y cece extern =n Soden el Wid HSH ahs intgs vg 5 void teott) yoid. abc sta 2 Ho: Void abel) . Z 3 void mainc) uy 5 main 0) Ba omen re ngs hig ¥ Ba ; th cil g & abunby proved ene aie in a bh w au ing iF in b Win ¢-Sede3 SES ade 30 we puion ap 9K. aaCompily will condi re every *< file as a Aeperitte file. Ex:Fiom ©, hon ang aa a frat value from se poticolan ay 20 bot wy Js compiling J+ H+ does (se az] can gc the odput. not bethon aboot 2-ch < Prey pane DAY 2 and vie vera——_——— W3 25)? 0% RECURSION :~ Function calling tet int (intr) yewsyslon. 5 mein’) 24 int {5 aw B. €(ne=6) fa) a a= 14); is vedeig pont GMA ol; FOC a] 3 as ofp 3 24 ft fOL Ink gS yclurh 5: eri 53 cd wand nt FS E Int a; int as a: 44405 a4; velurna; print (do); oid. mae) Py YF veeursion function call i 3 olp:5 Cnt : bue condition 1% at fae: a] MikeFO: end of fincin = ail spree rd « Not at ond of 4unchon-Boo eas n) We) Aeb 2 Bg void test (int x if (ne= 0) a aif); Fedo 1; fe, oa ifOocz= 2) *ahin witin dy Meet jsteadso j ree APN aes al min) . A= printt (d".x)s “pint (Yd, £()); . es rraincy 3 [aba] [out lint int J Spi, Aways dep the {x Al lui 3 oe whon “We aoa Yelum i eeu ¥ Tail Rewrsion: In @) If yeourgive ene is dhe Lok shornort if B x Body Reunsion: ln @) F veeursive Statemut jx within the be of the function then + ot bady yeansion . CB nae void abe() ‘atic il 5:0; aulo int {05 bs oy dears: printf(vakdlnigs) * ” main) i {e=2) Ce Tbe); ( pin XAVAW 3 3 Void main) ap 23 2 44 an yo tect) _olp autos; static s: Ie 445; Hi : Print “a/didei. sa) wid bees +a; Print’. dvd 7a\n'al par, 2); cS “A7d\v'e\ as, 4); ¥(ahe=2) abel); 2 5 print! (7d Yard \n' al 10,9; void maino € \e> ink fulink 9) (ies Cpe Mes exit (2\ tr) evtt lied lor) ly it (ne=) vu 5 8 Yelurn $(n-i) Hn); vad mand & : printf (4d) f(5)); ; 3 Fibonacci oui, — vid maine) Fe int s=5 prin (*yd'" 3); ' d silica . Bo ) li Be stack hed Print (a's) : : + C~9 compiler obj 5 Linky 5 eve. i age & Progam 2xecotion Is called i: PUA 2) DIKE blue vehwrn dnd exit exit) (0%) exit(. pts WS | ast @ » »\n ee [4] Jha chs @ che p24 22] Ye Ie Pa — it = emacs) ponerse AEH allen ene wh 1g fe Geer) Pain 4 Sag aren Sn her BZ Gehl sl So ¥ a ged shel 2B Zs ; value at ament addons ldject — long. LEER ' (he veleene cyeuh) oe evens Rh - Addn ot the opera In ahve example, char takes only one bot CRelevence operat) ee a Wit Fx , matters addy Dive howard cha) sae oes. haw enly Ie Manion ‘> Me “rs x + a“ - 0). ron will howe 5 ye ee aan ae _ his (eddren) ~ pif! oily CH @ all \ xAbove dno ox Aouys aboit wriqenet\ ok oon 3) In ren int [255 eee a e ay st + printf (aps addres (unique int i o We x: lewding parkive on comp, talks ‘int ¢ pj - “hE EP inked oF ving existing 1 = 21; Bo, eA Bach?) : Pt = Bo 24) » Which ct the falociing is A variable which cnkin the 1, Perley «che. addwes of ancthor variable +H 9 int #PLs 2) Pe aie tal ab pti verde ait x py: nit ‘ lew P contains 1 variable . add - hence it 1s calle as Ping ae porter fo an integer (at) inter fp lope: pointer. + Note 1 andep ane inkegp From all ahve Bes: variates. ae ne “conekals —> pb Ire poirker Voritble y al (oy) ie ae Si Sp, «bp ~ teabieg ali, ip, #1P wid maint — Addr Value Yetd mmaingy C2 = 00-41-60) Int i; (addi aiis - Ate Find a=W, b-203 int #Ip : i> lo; ip=31> / print (ard, 31, ips aa 4. poe a pi (xd iain); | te10; mini Asawa) Eng rs stp 0 wy 4 ice icky.» a ia i _ ee . se re th @ da is sored in Pana ip=3i; “ ink xip= gi, -© Ab is Moved in po pot in Xp © & oot valid (net equal) | and ¥p2» ip int type, #\p » inh type « | In Q (pl=ga) xpl nuans O, | wt S20yup ap ere e-0 | plod, parinb @ int * Po ey 1, = Tht 5 Se ¥2, P= ink ¥ tie p2, : ¥ prawn belae uhich variable thab® only we have tp omiden Q5 2q2 | x - Value d adders int a; dis inlay vavabe | Int xk; D)ga - mere addy) a= 1p; @wtart ity. BK = |oleger porter 7 Ae = ay Yartiae (valve at dddven). void main mi a=W, b=20; int plz Ba, xpz=sb: *Pl=30; = a=30; plz pe *P2= 40; > b-z4p; Pi (4drd\n’, on print ("7ehydln’, xpi pa); } ole 30 40 40 40 void main’)s int a-\0,b=20; itt *p-Ba5 xp2=sb ; ¥plz ¥prs pl- p22 * p2=Ap; puintf (vArd\n. a,b), pe inlf (° YAyA\n Apt py Sh 15 ine int a=: 20; int api= far ape=2b3 olp 20 40 4 40 op 12 “edrd\n) ab); “aw”, KPLREZ)> . Spi Ervor i) pina Nszeol(s2 Otss Ul eS ’ on Whey x 0n 2pcinter py x ae — Arithmetic. opevators A) Sizect Ghon'\;,2 “ (Net applicable, except -). n)seo (esa) 2 ; ‘. => Felaicnal and Loi opel fe 627°? bad EO 7 cement Peemer Asan het ily yr 7 Bitwise operates x 2) sizedel; 2 —> Conditicnd operalows ws ! 2)sizect (4p); 4 On « joiner and hep. Vata = Se f ; 405 Benoa 1) Hes 104, | 1b can there one -value (oy) ¥ Increment is vot dererdlont on * 2bit = walve 6 b 1) Nive depends on fainter : * 3 bit = (value (0 67) % | valu only we can Abe fut the. ange verly Athena . #Size of feito js 2B chen ch; fC ee ’ char xp; dea” fea a: bby as % Size of piney is cn tne addney Lines uwd by cmpilen- —\n $066 - We av vaing Ie Addyen fina to veprevent any addr. (0 to 65535). (Wal Turbo c++ - 2Bit(o 1 65635) BYTs 26 - 8 BK Alo 42vyabD45). Cb 2a/2 Ly A rdl Tie [False i) The size cf any printer is always same inseipective ot compiler. (Fale “ \ The size of any printer ds always ame iwerpedtive of any Adee (Trve), The size of a pointer is always Wa in ho comple a) The size of any yoinker wil vary from dala type to dala \we (Fale). 6) Incvemant on poivtken is on type of pointer (Twe\ 4) acrement on poirter is dotted Cin chan we Juve to on size ct poirtter Fah) depart ‘void minds a4 2B int ab; GO) fone fina chay hep: e “TS J ae iw ; op: £4: * \sernar in c44 5 fs b= a¢p: en ae aoe ae pin CrAsd YAN aagls ? ofp: 5-1 4 x \n above example, we size of dar is (Bh 30 we need to ona [bt from SI) 40,we ae comerting tt to Hnany: Addu ic same (QB) « but value will “vey (cp): void main£ ‘int a=5il, bs #Op; 0, bo pz ha; G i *Cp (ad a ¥CP=N0 5 eae printf" 4dtd\n, arb, x¢p), 3 ofp: 266 -I 10 tho this program we hay. changing te value of cp do bp, aE) ie wc ba thon we awe to pat (adic | Hane loth 50 ard te) Yep, printed has a ‘tie. vols "" void maina ¢ Mong L

You might also like