You are on page 1of 39
Ute Pang: is divided into |? — Small “Ports function. - —————— - POP follows o top =_ oP one al — 5 clown, ees | _OP__ approach. _ = yo eve. ie no __acese oP _ hos Wcr OCs es sais p Specifier in Pol Spectiers he ae Cait ond Cin Cin is _Gn obyeee es of the iP —— Big Soc to inke UP Ayom__i le Sixeann— pe like tiles conséle etc#s 36 Jo8/22 = Seno Be te an ob ect of dhe ofp _ an a Stream that is__Used _ to Shou O|P iP ciecams . like Wie recatls 3 They also used diff —_Uses the —_ingevton Cout uses the Opevainis . Cin - Operator __qnd extraction operator * Features of oop : Some ol the masi__imp. features of “the Oop Qaip Emphasis data ‘cathex — 4nan processor Prog CCAM es care divide Oxe-___ known as into what ob} Ds ate Gefinod designe } Such that They Characterists ~ the Object. - Function that opevak _on- the data are tide in the 0) = a of__o9 Object gee hidden Sand can't oxcd by external function. may Communicatwmne “with, each. through cfc he s New data and function can: be easily — \ added wheneves _ Necessary. * Pollowneds -beiter of TF Application of. 00) Real Fine Svstem = Obiect Oriented databace __—= crm] cam | chb Sys be ny ie ee AT ond oxpect _Sysktm __— Hypertext patterns end ‘Simulation And _modeli tog sm ; ey “Basic. Data__type Usey clefine ®ull-in Data type Char Signeded “iat Eloat Unsigned Short int Unsigned Shoxt int geet *_Unigned laqg int Derived dota type type type i b ‘ = Gructure Do ae =._amnay > Union integral Floating > Function SY aCGs0 hype type => Pointer >__ enumeration | = Reference 3 * Ink » Float = Char S Double. Chere Byte Shipper fyp-- 7 x Decimal : 7 +. Double 8 j long double 10 es Keyaords — P aoe Tokens :7 “In Cit the Smallest individual . unit ina proogrcnn. one celled ens. C++ hoc the Following — i Yokens a 1 A Datahype Rute Range ate \ -\2% +5 193 Char ce Vasigned char \ 0 {p.285 : \ =\9% to 194 Chay 9 32766 to 92167 Aca) Unsigned int 2 Signed int 2 * “Wipe Censerva’ conversion Process of ‘i Convertin redefine dyno ints 4 P. IP pastes = és called “a; "Fyne Conversion, kihen constant and Vasiables of ote ‘aiff type mixed in an expvecsion ze they Qte converted into sat : type -_lalpen are = zi klhen a ‘Voriable of One ype aye Mixed —_ with anothey 4 Conversion occur, Crt facili tuted the z on imto the tol implicit type Conversion ett type Conversion =. ae ig a ‘ ae Tinplicit type Conversion — This Conversion ieee Bp ae as pactoumed! - 52) 09/22. ip o8 ee } by ae wWithouk co 7 yntex vention on : 14 peneralr vohenever aie - data | 4 i ure. enter __ mixed in an expression , 80 9s nok To f Pe lost intoymation - 2 re on [= Explicit = Conversian _of_an _ Opesaine shy ol Specitic type la Cas! a : Called hype casting, : ex xp Vicid is user elefine ‘Yhol fase proc expression to be ———) Vo 5 evaluate _ Ex A 0 \ + SS x Conhol Shucture Stotement__!n_C | i K On ; i econ i Sequence tes loop. E mig Ole — “Two itor Wat ees bo.while L Switch - Multiple Branche, L ee Bee gs Extt Conho) Enbay - E Conte! —_— Vaid main C) ink 510; Hoe == 0) 222 Foul ce" even np” = f at — else Statement rit (condition ) = False Tie 7 1 i hile tow | e I { else + include < iostyeam_.h> +4. {oclucle h2 Noid main ( } nt a Couk. <<" Enley ho Gites Ost a £ (a po >) Ea a a Bee Cou odd mo Bieta noe ee ap in c++ aes] —__tahile | —Eox( “Initi lization ; expression / Condition | Yeck Peteny 25 —_Updation )_ Seater a —_YCode tox {90p oS Fold aint) Si"fniey the no SOS ham — me flon chavE ae ile CStort a3 t 4 _ . -£ hii : i S alee —tondilion 2 atl wae ee \.. (Fos open L ih og|og|22 int 15 Clases) > Sy fox i= 15 4<55 i++) see ; aS Couk << i 5 : geicho H { lalbile Syntax = Do - while Tntailizotion “Totialization + while (condition ) do { 1 Statement i se Statement 4 . Updlation; = Upclation ; { 2 me while Condition) i — @)___# include < jastream . N> # Include < Conia.h> Void matin) gees Cy i ® voicl main () ink cys ) Cou Va Cout << 12 v i { | getch (i Q fe lee a yp 4 declaration; Noid is — declo aside the 4" header. This. does xeluan ony Value —_— fT mame(yoid) = ai Void “Sum( Void). ie Eee — Noid maint) d ee ail); ee Sum (ya | oO | ae oe 5 a, into, o Ss Te ele eee Cour es two" oo = a> 14 a - z pees Seca estin See ese Cin SoS eo bs » ety gee bY - - re a Dt touk eS Class Sum ‘eee type re CAL eae Be Piblic “+ : i Couk << Sum” << cit a ei ee if — Aum )3 qeace above _ example — tohon. sae Crea Es as Dhreck of a Ck sum close ener _= Constructor of this class. and _indial a = 10; and b= 903. Trexe = Beemer the Mo _ need +0 call eee Constmctoy -» Distructor is a. member ti believe an ebjeck pee coapistauctor z = pe A Contimictas f" ic called _Guinmatically 9 pe nese ve Shier: nut of | econo a G0 — disetwuchoy (Ss used tp Aishny€ —— Bee 0. Object thot have eo. ee by _._ Constructor, tive — Conshuctoty -WeMnicey 2 ie 4 member > a ee n To 2 _ fe ene distruction-_is a _member 4” oe Name is the Same as he Class Mame bub —_pyeco - 2 meced In by ) tilde Operator P g 42 = Sum) t ¢ Ex - 2 Sy nox = Claes integer q 1 m oe Ca 1 4 = a ‘os ig eo» f.* tia = // destruct Inlhon _desimictore Cell =e ce qian : ends . ln ine Contam sne Aseucicilsie when the delete operator Call Fealure of dasthuctor “We Same name as. the class uk it preceded by Hilde (2) No avgument and - sielum ne m Cyt 7 > Sum) 3 ) a \ \ NOut-<<"_Dostryy—j Couk <<" Destroy j= } ‘ a { ) + For deshuctor Neve tasks any ay ument— now doa § z 25 Ti _woill_be invoked —_ auctonmaticatts (implicite) d ie dor Compile won eet exit _ fromthe ‘pacq-ram to clea tp ot ig nd Lan gel exciSive a tt fess moticeI - “to eleclare destuctor im Ug paospran Since_th : wialage Sox - fulure use. As Ve foue << NO EEL cometucter enececbed | a pe es CD ae Ve An eT ML eee ee execuled 3 ve —— ERI Nae = == 31 BER toy Congkaicine task ail aifeee Objeck of SaMe class as an axcnimeni= fot example - ‘Th the above case, Copy __Constmucor calted in +he follo Wing Wey g Sam dof gif x String Combination _of Character _is String. eit The __Cfandard __¢+4 String Class —> eee on es \ Sty ag Beec) Sequence of- ANS! C++ include < Conio St eS Pe Ne main ©) i Siting S12 re String Sus Sap") 5 Stridy 89 5 cinD> g, Sting $3 > Cout << Si j W = give, F ; ANS| Standard C4 sdle_q new called String The Sring | be cee Vike any — in type data String is broated de. ane Tnem Contomes clags byc and ail _a\hosithms that are applicable fou confuineys. can __be._used Udi th, rei Objects . Lot sD} g nh x} Fox using Sivins class, 182 be must incl ae < String? in i ) mOQT ATE 7 Qu p ean ] “The String Claas in Ney__torrpe ond inchid eg. many consinuctuye member fy and Operators Wo use constructors member Al and Operators fo achieve the ollonsing | Opexatton 4 | * Crest Opesation | ()_Creoting Sting Objects (2) Reading String 0 ject Aen Ba U ) Keyboatt, = Cin 4 Sc; (one word) Sem Displaying String Objects to. Screen 7 ae 3.08) —Findtng a Substeing From _.o, Sting |W _Mogitying. Stning Objects S$. 5° 8\465 ie. ee trig ‘Object —_ eee po Acting — Staing - Osede i) Accessing "chines ina siting ae ao ea eet os : BA(@)sAL one F ‘ Sie fe es cea : 9 Oba a Rize np 7 scl 1a Commonly 2" using string constructows 4 Conshuctor usage Stating 5 Tox creating empl, =. Sane ae a Tp Sialog Ceonst_chot xen); Rox treat siting pao ate f : Object nF oe et! EL ON seminal | SS raetag ey i 0 So obe 4 trom Ole Sti Obj — Siving Ceonct String 2 Si); C a =H Qppend OC) Cppends _a— park ob String to another cring 4 So dE) Creating siting Objects — x 2 ‘String. So Ust S\ = 93 // Asbign oe Object aes Sz = abe" 4 a9 ss Si_,S2, Ss 5 Cin >S, ee getline (Cin, Si) 5 eee

You might also like