You are on page 1of 79
5G Programming: | # Sizeof operate: AHinelude int moin O on Cd" pid C48", “Hell vlord! ")) 5 Yetur 05 uY | Op! Hello world [la | 4a) include Static iat 1; Static int 1=275 . & Op: Stodic ink i ofp: 0 int mainQ & Sdic int Prin’ (“hd", i)5 veuin 0; fo : al Scanned with CamScanner fk P operators: Assocativity Lafh to Tight Loft to vight 4+ len denwctons + Laxtal ananlygig ts the ivet phase fr the, Compflaton process + Loxtal analyzer (Scanner) Gang fhe Whole source, progum § When finde the meaningful Sequence of Chavacters Clexomes) then fF lonvarts Pt Snto a token. * “Tokens Jexemes mapped into ohon-name 4 ei 1S Bi bake atte WEEE Weew > Short cinwit in Ingical operators + + Th tho fs 0 condition anywhere fn the expression hot velume false, then the rest of the condition Otter that will not be evaluated '& ink main) ¢ int a=5 ,b=3; int tner; iner = (acd) ag (dH); Printt (“Fel\n" non) 5 PaNE ("4d" by; Folp: CHd'\b) 2 9 at fe —_ Scanned with CamScanner =} Biwise Operdlors: a) cK — Loh ShifE | — op Sy > Bagh shHt ~~ — NOT A —r xX0R TEX: tHindude shit left-by L position 0000 0001 — 3 0000 0b10 —6 + Lett chifing is equivalent to multiplication by fio operant > Nor =3 Vor <4. (axa!) =¢ Scanned with CamScanner P } aight shifling fe equivalent ty division by grat opuend > Vor=3 0099 904 Vor > L 00000001 3 — ail a b Examples include intas int tna) uk pasate £ Print Cd", a) int a= (3,48) 5 . print Cd" a): sp: 3 return 9, 5 * Op: ® Galuades ghost pperand) Scanned with Camsdanner #include Suittch Stalements Hindlude checks HY x=L fat x=a; switch 4 ; cases prin CX te L')5 break; CASUAL: print ("X ts 2°); byreok 5 cases : pyine UX ts 3") byeok; defawtt + print (' other"); byeoky Scanned with CamScanner & Examples: | | AYE tnclude <5} dio.hy ink nein () i | int f= 104; for (905 typed) printt U'Mello World "); relurn 0; 4 + Op: Hollo-world Cu +imes) typed fefyL (Right shift) 10%4 = 100 0000 OD00 | 4a) $Hinclude Pyramids L934 5 3 yows — Solumng L +f 4 Wws — T columns af viet S fowS— 3 columns a ob tittle § rows ~ 11 columns (oO) nH) (nta) So, Nfows — (an-}) Columns dor GEL 5 f <=G 1H) { for Gab; Jee an 5H) t 3 a H(jy=sN-Q-) &¢ geet) Spottt #; ase, € orantt (°°); 5 Scanned with CamScanner : Uy) #include 371 jlo = 37 while (¢)=0) Count=£ { > atho=3 F=G)o; 8 Coynt 435 count=2 d — jio=0 Count=3 —> order + To Mull each agit nm Hmes: 4 add -tem: cnt= count , vesult=05 While (od= We q= gies bem = yhlo; mul= 1) whyle Ccnt}=9) } {nul mul aver } y cnt-- 5 Vesuit= result + mul; Cnt= count Scanned with CamScanner — Nhl aL mu = 4 result =L > 3thlo=T mub= Tet #T = 348 Vesulk= }+343 = 34 > 3hlo =3 MUL = 92343 =27 yesuit= Httat = 3th ERA E BINT S spbosaate) € dA apker Prime Number s Example: a 3,5,7, 1 ++ | SS Primo Numbers 4, 6, 8,5,10 \S composite. Nusnbers 4119 Nola Prime No. include tnt main () tnt m=a0, N=30 , SUMS Sum= add (1,2); prinlf-(".sum fe %kd", sum) 5 3 Int add Cinta, int b) ‘ return (a+b); Jj + O}p: Sum fs 50 Hee, (man) —> Frguments 0) Achol fromedes Cagb) —> Parameers (er) Formal Parametex XK Function als ayy Co by Valle Xi} Co by Reference At} Call by Values tnt X=10, y = 205 Int fun (intx, inty) Fun) 1 ea0, print Cxatds ytd) xy yee x J J & ofp: ¥=10 , y= 30 [eo] fio] Scanned with CamScanner P gy cal By Fearon ces git x10, Ye 5 fon (4%, 43 prin rend yatd' xy) 5 int fun Cint ph, tnt ~ptia) & + phd = 80; * plas S07 J x » Pra Pha » [29 [24] 0 FL oS REL & 0p: X= 20, y=10 =} SiG Funcifonss * Functions are @lobol by Defaut- “Ib we Wank to veshtd dha function for thok- partular page in which —f-ts dofinad, we have to use dlelio toyword * Exannple: ‘amoin ¢: AAnclude n-1)s evn 05 mts odd 0; Tehwn ; 3g 3 yew; y Int sain () { . na Mp 8143 658709 Scanned with CamScanner 5 FuncHonst sompalte: % Fonction ts basteally a Geh of Ghtements Hak takes fps, perform Somw compuletion ¢ Produces Op (1) ‘ehrn sone Valuer. Symlaxr Retumtype fun_name Csek of T)ps) 3 / int, char, Hob; eo--- wt yrecescary > Why -functions? Be, once tH fs detined, fr con be reused over © over again. (Rouseability] = Function. Declamtfont gnt fan Cink ,char) 3 Vv ypecol)- Parameters (a) + Algo caled ag tunction prvtorype- + Not necscary to puke, name oY porumerers T function Prototype: tne fan Cint Vani , char vara) 5 + But fn tuncton definition, we have to Menten 4he Tome porumeters 4 Example: 4Hinclude faactton Dent tons int add Cinta, int bd int sum; sum= atb; return sum; J “Ee spindle return D5 (flet.c) lea.c) 4 Rouse of same ‘function in onotter -file ts posstblo- Scanned with CamScanner }y Stadte Scoping: | * Stach fs a container (Mumon) Sxgmert) waht holds some dota * Data te Rohteved th latFO fushton. > Activation Record composed of: + kpcas of colo > Parameters of calla Return address of Calla + Scoping te Necessary fh you wort fo yuuse Varfoble names tnt fut int Puna) | int @=10; int o=20) | y } (Stope ob '& &3 wHhin “thot -function 1) a Ex -tHinchude dynasmie Scoptngs moun Y Pon Call. Stack Tnikoltzd = Dede Segments Yop: a= &s~ Delinthon oF Varable de resolved by Searching ts containing bode , tenet Pound, then Search fn. calling funtion, € $0 on + Dip: a=30 (fer abwe, pryran) scanned with CamScanner => Amys + 09/83/23 ¢ Date Shuchwe cofoining date values vf Similar datatype. o Sytrtoct oka type Nome of-alrray [roof dunents] ; int sary (55 or [TTT TY | OREc oa @ze = 5% Sizeob (§nt) =F include tedeling NWT int main C) tnt ofn), ts for (f=05 fans 4) t print (* Enter the tip for thdoxsid: 3) U5 scant C/-d%, Yalsd) 5 3 prine (Nn Fray Gemrantts are + VN"); for Cis05 FCN y FH) t prime (ld; alt)); 3 veturn 0; ) Scanned with CamScanner ¥, IntHaltAng 4D arrays »Melhodt: arr (8) = €1,& 3,455 * Method a: arr] = {4aA3.45)5 + Method 3: + Method +: [Fam user] tnt are [8]; tnt are(5J3 orr(o) = 15 Deere ants] =2; yi DSi <3") iH) ayy [3] = 3; Sean (Std? Lave [3]); arr [3] <4; 3 am(4] = 5; + tnt orr(t0] fop (P= 5 105 F4) <=> int arr Li) ={0}; are Lt] =05 3 (Zh are some) + Designated Initial zadion 3 int ave Lis] = (Co] =4, (T= 4 Cel* 333 t PoE ary (io) = {1,0,0,0,0, &,3,0,0,0}3 - Scanned with CamScanner | | Ul ® Reversing sho -fimy: 4 FAnelude =; I-D © ake ali]; o yeN 0; a) 410 find repeated Digits Ari ncude (sti. hp int Moin () int seen [io] = 40} 5 ink NS print Enter tho Number: \n"5 stone Utd @N)3 inp Yon; whyle CN? 9) t rom = N10; Scanned with CamScanner yp (sen Crem] ==) ey) al, gen [rem]= 15 N= N95 g 1 (ND o) print U Yes \n'); ast prin¥ C No\n")5 aun 0; 3 2 Count Grey Elemnts + che of Lamay » No of _ Stew of Whole Element Elements fray No.of = Sizu oy Whol Aray | Euments “Spy opkarey element | seep CONAME) Ay of Clements Sizeof (ort-name[0] ) HEX: toh af =41,2.3.45, 6,78, 9109} szw0p (A) = 4X10 = +0 bytes sizco¢(a(a]) = 4 byles So, No. S$ Elements = S200 (D) Size0 § (QC0)) = 40 _ oo oy - ~~ Stanned with CamScanner »y Mutt Dimensional Array: + firey ob Anays + syntax: dala ype. avy-name [stood] [sizeal.- Int a3] (4]5 MAP oney sor aa) (J (535 a> arty. =p ad aay? int arr (4J(5I5 yows — columns 4x5 Moabix TLE] errenp (am) = 4x5 = 20 shewnts = aoxF = 80 bykesy ADiHalizing 2D Cray’ +pothod 1: ent aa] (2) = 44.20% #565 0 + Method & i oats) = 4833, CHE Obs a man, [st20N]j EER] | BS Scanned with CamScanner F ‘pccessin ae lumants : . (ESE afo] (1) t 1 Row — Column p Printing ad anvay: Int ca) La} = 444 BHAT EFS fop (feo; (KR; TEE) = —>] Row for (d225 JO35 JE) = — |] lun, © oninie ("4a atityJ); J 3 yop: Las4as 6 > 30_ fray! int ane(2] 3) 03) ; 4os™N Meons two 3x3 ap anays o 7] & o | & Ont ; Hts 3x3 KS avr (0] (0) (8) roa SEM ahix Pow) Column Scanned with CamScanner Tak alex) £3] = £1121 3- 45617 FF 1, Myla}; + Mathed & int ab J I= (E35, (45, OFF, {C1894 5 Ly. 1AYY Hs ott ol & of t lala o]7\o 9 I He S516 Lf} to fn fe to. 93 [1], 8*3 + Printing 3D omvay : int a fata ss = 412135, L45EFY) {478.9}, A1OMIAY u for (1205 142; 1H) 4 for(jeos 3&5 JH, © aor (he0; KS Kat) © | © antcred’ aI Bs S Scanned with CamScanner a examyes: OD v wrile a progyun -thet-reads & SxS Oray ob regs ¢ then prints the row sum and column sw: #indude 2stdio.h) int main O t mt afsjs] =¢ £8,3,9 0,10}, {3,5ATIG, (48, 6.93.44, 418.7, 3,493, LB‘, A. 6D} 33 int 155 int sum=; printe(" Row Total * \n") 5 for (f=05 i<55 HD { for GEO JMS STD ume acd): 3 prinie (* #d7 sun); SUME D5 Printe(’ Column Tota § \n")5 for (J=0j s4s5 JD “op (tao; tes; t+) 4 Scanned with CamScanner on aC (jI5 / primec'y.d', sum)s Swn=05; 3 relw'n 0; 3 day Mahix Multipieatfon: Hinuude doting Vax SO int morn 0 ‘ot aafmtox] (Max ,b (max) Lax] , product{mox)Les int rows, acolumng brows, bcolwnns ; int tj KS int sum =05 print (* Enter the pows Columns Fen Phair aw) seong ("7d 1d", POWs, pacolumns) 5 print (“Ente the Elamonts of Mahix as\n"); for (Y=03 Td arwws; It) oe (je05 F< Qcolurmns 5 Jt) e J soneld" ¢altIl)); 5 Scanned with CamScanner F HEC’ Enter Rows $ columns ef Moahtx b + \n"); gant ("7d td", ebwws, +boohwmns); (brows | =acolwmns) Sramtt-C° sony! cont Multiply \w)j j ase pringe (“Enter ho Elumorls of Mahix bs \n"); forCi=0; i Void minimax (int anv£1, tnt len, int #min, ink *na) t Tmin =*max =anrto] ; tot fy for (tet 5 f ¥ max) Pmax = alt); i¥ (a(t) < # mtn) tmin = a(t]; j j Int main { Int af J = {a3,4.a), 98,587, 4, 3a, 1D 128, 986, 50,3,4,5}5 tnt min, Max; int len = sizeof (a) } stzeof (alo) ; aminMax Ca, len, $min, ¢max) 3 PAE Minimum s d\n" & Moxinums /-3 yn} vetum 08 anit , Max) Scanned with CamScanner | y To find Mtdpotn’ of fray: include nk *Aindmgd (tnt al J , tot n) 4 | return ¢a(n/a] 5 $ int main O t Jo aC] = 41,213.4,535 int TL= Stroof (a) | st220f (a(0J) 5 Tob *mid= findwlid Co, 9) 5 Pn Cyd’ *mrd); retum 0; 3 How to print an abdress. of _o. veortablo $ # se “hp aS a -fermake speddfieo int main) tnt t=10; int p= 4 na print (Etre, abaress of vontabl, 8 PP): aeturn 0; J Scanned with CamScanner => Potter frtthmeltes <4) ton 4 ~~ > le="+3) a 0 XL 3 ooo Rea [008 (wy the Who ae hs P= palo] P=pt3 So (p=ptJ = galty]) Hee, p= alo] = p=|n00 PaPtt S p=lowt+Gx¢) = p= loot Pas-Devemon (P-L sare ag PreDeoremnr (~—P) J srorement Scanned with CamScanner (es ] Wad RL Phea Joao Ra Prod add R3 RI Ra Taliwr | Aad | dake | ob b X | Y [rmentdey wy) 9 x | oY | ye ments Olp = return 0; } + use elation operators (<,>,¢=, >=) # equality opertterS (==, |=) to compare, pointers. — olp aL Scanned with CamScanner : . qu) sun of Elements of Povay + 09/03) a3: tHtnchude = fedeling NS int main ¢) int a[N], tp 5 PROC Enter the Values: \n"); for (pea 3 P<= at(n)3 pH) Seong (hd) p)s print (* Reverse order: 1); Yor (Prar(nel) 5 prea; Pp) Prine (hay #); Teh, 0} 3 % Passtng Array aS an ogument to a function: Tochide ft add (int bE7, Int len) int Sum=o, f5 for (1=05 fle, HY sum += (1; vreum SW; y nk moto O 4 tt a[] = 0.93.43; tnt [en = Sizo0t(a) | stew of (a(0]); print? Cbd add (a, len)); ;eun 0) canned wi ~amocanner P » using Pototors to prin’ 2D anrayss (o] 5 p<= alld 5 px) for (p = ale print ha", *P); "| awd f LI) 7 ato) Rowd y ataen Uw” Rowtl — rrr) > shingss chor phe = “Hello”; tetc =; Bley Ue \of or ls¢s alate side as 9 (0) (0 MW age) acyl] + Shing |Heral © tharadlen constant ave not sane nye oH A Declaring Shing VorFablo + char s(sJ 5 Scanned with CamScanner ¢ Aloalng Point Represoniatton’ 4 | # TERE 754 Fionking Point nunnboerss | Double Prectston format (64 bits) 63 6 Sal 9 sgn [Exponent | montissa | tit WbikS SB LK Bx: Represent (1059-125), 17 single $ double preciston | format A Steph: Convert decimal Number fo binayy mumby Gass), = (oororo1) ©1295), = Coal), (1as9.198),, (Jooitloroi!. vol) u + skpas Normalize she nlumber. (1.1) af 7 —> gle Precision (4.N)aF — Doulle, Precision (Jo011 o/011- 021), = 1-001 o}01/00) xl? N Scanned with CamScanner re +t Skp 33 Single Precision torynat (ev) Here, = £-1aT = 10 (137) = ovo! 01), Positive — 0 } Sgn Negative 1 s E M fo 1000/00/ | OO/!/ol0)/{00!..- Tbit Bhi a3 bits # Stop Double Predston — Poymat al iN ) g E1088 Heya, &-\va3 =10 (1033), = (10000001001) ,. ° mM |.000000/00) | O6\!1010//00 Veith II bits Sa bibs Scanned with CamScanner ON Aly Additions ¥ Subtraction: | |The too fleeting point Numbers can not be, | added. oY subtracedt url thetr exponents aie | i SOMe. + choose jhe number with -the smaller exponent “> shift Hs mantissa, tight a umber of step, equol jo the difference fn exponents. (+ Sak the exponent of result equal to the, lager exponant. + Perform addittn on the mantssas ¢ determine thu stn of the -yesult. + Normalize +the vesutant montssa i needed | EX 9.15 + 1e.scar 915 = 0100)-110 =} Loonioxe 18-5685 > 0)o010- 100) => J. o0)0100) x at 50, 915 => ooojiio x gt 9100111 00 1.0010100) ——— \[]000101 —+ Mantissa, “a7 = 4 E=[3) Resulk= \sooojo} xi?! f: Scanned with CamScanner P 21s . gis Muliplicatton: » Result x3 = XL * xD = CI (rar x af!) # (-1)5* Oma xa) sign bi of the multiplicand fs xor'd Wh | mulliplier stan bit. « Multply the Montissas » Normalize sum, efther Shifting vybt ¥ fncvesenting the exponent or shifting. left 4 cecreanenting hy exponent. Ext \a5.\as x 1a, 0645~ 6 /ep= (125-135), C110}. 009 > JIM OlDol xa (c«=133) (19.0645) > (J100- 0101), => 1.1000101xa° (Ea=130) Resultant Exponent = 133+30—la7 = 136 = EL+Ea- (at )VETPOLOO].::- 1-1000)0)900---- (0- TBO oF A J. OD} o-- --x Qh ——yY Mantissa e eH jo Binary v¢ 137] Olliloto- ~~ (36 Scanned with CamScanner Ny Divtstons © 3 = XL] xr = pcm xa | (ay Coax a) = CY) cm Ma) gr ° S3= SL XOR SL Subtrwt the exponents ¢ add (a7 tO matic she RxleS5 -)AT “representation * Divtdo the amantssas and debermine the Sign of ho qesult. » Novmaltze ho resulting Naluo, PP necessary. Scanned with CamScanner | 7 a f Reading’ int input (char ot), int n) int ch, t=05 Witla ((ch == getchart)) != "s0') i} Cicny sti] = ch; sh(s] ="\0'; ke yum S3 Scanned with CamScanner iM main 0 char tt [iod); | int n = input (sh, 5); | PUNK Ad ts) S, Hello); eefurn D, j + ol: Hello, How are you? S Hello we putchar() : purthar acceels Integer axgument Cwhech repress a thovectn tt wants to dfeplay) # vetums ox reger yeprosenting fhe Character Willen oN ty SOreon, Ink putchar Cint ch) + Be , —HAinclude | tak moin) £ int chy for( hea’; th <='2 5 AH) puschar (0h); TUN 6; 3 A op: ABCDEFGHITKLMN DPARSTUY WXYZ ch (I & if op A a Scanned with CamScanner prone (C10, \n 3 pine CLC, \n')3'% putchar Cyny)5 27 putchor (“\n"), puks ('\N)3 X puks (\n; e— pint CHS) \N')) % pint Oks) “\n'); + strepy () : f chart stropy (chor ® destination , . const char couree) > shy %S Used to wp ow Shing pointed by source, +o the destination z ‘ #inchide < sidio-h) #inoude int mainC) £ chor stri(t0] = Hello"; cher strate); d pientel 7.5 \n", streey (she, HD); PIN CYS" stra); tedurn 6; ay tole: Hello 4TH tho |egth ob o shing pointed by 4% 15 greater than the dnglh oh Fhe tharos array Std fhe wall be an undelinggs behaviour, To ovotd this, We wn call “stncpy” -furtlicy, Stn epy Cdesttnalton, source , stzeof (desttnation)), a Ex: include Henclude ampans two stings’ si sr —> Returns Value (teas than 0, H SL char * fruits] =4°R Ovanges’ "A Apples”, "3 Bananas", “L Pira-apple’ Fruits | ofa Totrlel{alels[e '{+-yaT Tale[eft felsthe al—+-3T [8 [afn[e [mn] [5 | SLT TP Ln ai pip.) efo) | Example: XY) chor plac] s Sor teres € GEEPPLED) int [mgth = Shen (Ss); {ono Yoo Yona’ = = = «= og ant 2) ii) : S a recesses PRLDTL +0): Nodthing wil be patnted day char cl] ="@ATEQOI"; chor #p = Cc; prec’ ss”, p+ pla] —pliT)5 PLT * (008 4 «| ale 00 Wpol - - - ot Pi pit] — A (6s) canned with C p@ — EB (69) | a. ry}. TL becomes, pring ('-S", 1000 +69 ~ 65) w 1D04- So, Ojp: Roll > Fancton pointerss_ int moin () int add Cinta, int b) 4 a result; return otb; int (pte) Cint,int) = ¢odd; a result = 4 ptr (10,20) 5 Pin y.d% result); + Example : (Calunator) Hdude Ardefine ops + flock sum (Lloat-a float) ° vetun (arb); Alok sub (float A floatb) eum (a—b); 4 float mult (Float 4. Hoat-b) ¢ . meton (at b J; & canned with CamScanner Fook dtvi (Hook a, floab) 7 hn (al); int wmoainc) Float (# préfionc Lops) Cloak Flock) = (Sum sub, fot chofce; mult flog ob; prinde" Ener your theice: Ofoy sum » Ltor sub, ator mult, 3 tes divi Yn"); sand (“J-d\ & chotce); pene (“ Enter the +wo num bers\n"); SOne (HE LL) ¢a,¢b); Prine Cy. ‘, ptrdfanc Fchorce’ , vetur 05 mt Center] (arb); $ Scanned with CamScanner 2 structures chuclue 18 @ user dofined detadypo thot can be used fo Group clemonts of differnt types Into a stingy type shuct ¢ chor A MPING 5 3 com, COvQ 5 int maka () cart.enging = “Agen”; cova. engine = "EFI", pring o4s\n’, Corl. engine); prtndt CAS\n, Cova, engine) ; sreturn 05 3 + Exam let 4Hinclude " tH!) ; seont Cd", & Li]. seking); Punk (trter tho carded city milage: * 4H); scant (“d\ ¢ clr]. milage) j nt y . prineC/n")} eA, 1 gy + Pointer to Ghucturo Wwables Struck abc 4, , nx; pink Cd 7d) phox, : inty; i ply) , 2 rehur O, ‘ int-minyy y Stud abe w= (0,143 . “Huth cho *pirs ga; pe ok Scanned with CamScanner by phx ts apivalint to Ceh).x 1p Structure Packing! s | Epragma, pack (4) —* Th we cbnt Include, struck obo © thor ofp will be 19, | cher 0 } fat b; chor ¢ 3 ¥ var; | tat mond) | “pane (fd), etek (ee); | wen 0, rol 6 | * Unions: Union $5 a user defined dots typo but unliky Structure, Untén membors Shore Samy muvory locaton. Stud obo unton abc tC - > chor b Into } inte, 3 chavb | 1 + ay uno, arombers will chav came memory Wpcation, ap we make hanes t ony momber then PE well be aefleckd to ote -rembus as well, canned with Camocanner HATTIE a union obo { {nta; choy b; dvr; Int tMafn 0) Var.a=66 5 print (Cyd! Vor.a) 5 print (Y-8) vor. by 5 “relwin 0; » ofp: 6 A y . ¥-Recessing. ‘members Using —potoreret unton obec { . tnt 05 char by 3 int main © € nfon obo var; YOv.a. = 99; Unton obo *pe Nays PINE 7-6 , pa, p>b)y ’ behun 0 : & + Ofps 90 = ~ Scanned with CamScanner - fpplications of Untones 4 FEPYAgMO park (1) Shut clorg ¢ | double prices | Unfon & | Shu chor +t; Char * ahoy + Tot pages; J book 5 stuck] int colour; Pat -Stze; char *dostgn; 3 chert; y tem; 4 Ynk smnatn C) ae Ste s; S. them. book, 4#Hle = “aBcp"; pring CovS\n", Ss. Hem book. tHe): print (4Ld) stzanp (S)); arlun 0} y 40ipr BLD 38 canned with carttanner ¢ Aypedeg unton & Int 05 char 6; double c; 3 dota; nt main O a dota ary [10]; an [o}.a = 19; Grosteg. an aoviay ow[J-b ons containing amtxed Animas) an[s}& = 19.178; Aype data. vrehum 0; 3 + Enumeroffon (enum): wear defined typo vihteh ts used to asian mes +b tera constants (? nares are taster 4o hardle Pn prog rams), eum Bool £ False, True} 3 fnt matnt) “um Bool vars Vare= Tins pankk rtd’ Var); aihun 9; y 4op: + Scanned with CamScanner + Neod ef mum: > ~y Enums can be declared) ft the local scope. > Enum names ary automadtoally Prvttalpzecl by the compiler + Int moinet) 4 enum point C¥=2, x=34, b, z= oF} PAINE CL d td fd td} K.Y,2, 435 return o J ofp: 8 & 0 25 Scanned with CamScanner

You might also like