A (Ind) S1na Studunk: Subempuli Progama'ng Dle3/os/2721

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

MARKS AwAR DED

RolLNo 2119072
RoLLnO Cin tedp)- Tuoo C e m Ja bh
A

NininHuoy and t t to

Subempuli Progama'ng Dle3/os/2721


(und e- B kch Semese s - Seonmd
Maks o4ad Co)
A (in d ) Studont Alame: H Ars hu
| Ma xium Mors 20 S1na Studunk

Nam Teachen Crd,


ckar ord

Si'gn valuob
ame vauer
2 d11902

A Atun chm u agoup Staltmen tuat


fuk A
togethe pem
tunthn eded antim ly Ht Compler about a
fun chit n Juum +ype cnd paramiliny

Cocle
# inttude <ioshcam
uJing nam espa te 34
cla Mech

punre
n g e t Sum (int n)
int 8um
=o
ww'le Cn= o) i un
um+ n El0,
n/1
7eun Sum

in n
Medh,M3
un> enter Number" >>n>>end!

Cour Sum eu'": << M. Jetsum (n)j

t t Numlor L ts9
Sum dig ig td
2o1l90332

Frind clasy A iend ctay can a tey pivatt nd po tcli


mum in oh'ch it ù of ecl
be ottes clagd
aud
os trend
Hu Somutimuy we to cllo a pantcul al Latod Cley
pvo mumbu t ottod Cla
or eyamplu linked Ju E CLas may be Guldaed to
access
privali mumbes d Nedt-
C+t Cerde hor fabnd elas

Cla No da
privati:
in kd
Nocle ne
o t o r mumbeu nede chay 7

No cla nkeel luE can


Crey pMvai
noda memley
fpread ctas uinkd làt5
3
frend tuncticn ilke fn'and class e hriend un ctin can be gho
sper
speiad n to acces pm valz a n Tooecled mmod

Sampu Cocde
C as Nocle
Mvalr

odi Hst
bes nne das 7
/ oth ed mam

tiend int Liuked iàt t: eatdh 0'


pm s eauc ) uinked Jit
nmemb eu
Can a Cces (temal
2olt9032

fid n etin
0) 3+ u wualy uyad o i
perata ov loedhg oppratin() Hu decl anoemcn 44
o'end daM, t e kmend jwod
wed rund lasd
key oeaed
C3 t haps qive a non-memleg (e) ole cotng 1 Cs fiend
tun chin t a c tHhe koueerd no uxd
Pn' vali munbew )tot e d cla Can acey
) 1+ ha to be deducd munbey en clay inh andtod
ehoe it ù wed
(4) Tt u nst ne cejay to edeelare it
( y wea to acte
pdvallb ere win i
aupo teetid mmbey t
clar. wed alan clay
A A tnenl ctas u a

pon
C) Tt Con be wed w Jle ba Creaid ab can inbon+d cexI
fun chin unhien aye ae clajl
and Hua
Qo119o3 2

CO C
Can hau tuL
Fun chiern Overloaol ug Ts o om tun t'ns
8uch bunctH'ns
Same nam but olufent pauam elny
a
aL Coll ed fun chm 6vload'ug. Functhtn overloaou 9
Compil-tme polymo phum

oveoaol'ug u Similas
Le fun'n ovenloaouhg' Fan ttion
ge diFfeun to Lehavvou
f polynanpluum that hulps
oith e Same name f n chen
evelo 'n Ctt uwed fir O Caclo veusa ililg
funcmm aolitug
S aSav MU m
ualso ec to impove tw e ad alalry tue code
wed S Hal t e po
Pog mme doehl- hon to
mem ber vamo w ntm nam

Ecamp
includo Croshean
ayin namajp t ghd

a=b)
eu m a
el
3
loannax (toat a,ttdar L|
a >= 5)
n
elye
tum b
Q11)032
(
d)
inctude <ioyteam

Cla pantiti panF

in S5 MM
Puic
Vorde time_takn )

Cout<u Enles wnuy"


cin » MM
Conu Enter Secmd
in >SS

voicd S h o data)

Conu ee MN
<munut e <s Js««" secmds "ee cnd;
pahiciptnl opear + (CPat Cipan comst+ o4)
paAipent fin
in SS=
SS+ob', Ss;
bn MM= MM E oj am;
Cbtn Ss >=6o)
hin MM tt
in SS= Co
3en in j
3
u a n l)
pantupant a, b, ty ds
a tneake n l)
f i n - takin U3
C in takn Oj
d. tin +ien
U, +ot(+d 3
pah u pant e = a
Lol190 32

e. skssdot ;
2 tt 903 2
2
A An cubs toa t CLas me a k u not wed -to Ccali cuny
objec i t own uF it solely exugto act as a be
ela Hu o-tho clayey that mea ndtu cLta dE day
uyt e a
pat Some inh edtan u hieredhy.
( Abat clay U
deigd +o act a baue lad
- t e Claij e
IE ùa d esign con tupt i'n a pog van daelopmint und
povices
providey bue
upon wuch our cl ay may be bl-
You Can nbl- Cortai oljed an absbA c cl
Abstaact ua y ed oy fo denve otus chld lal
A clad wih pu* vitual fun cti'r u Called

Auta ct lay
Ctt co
i n cuele <i'osHum
using namu spa e &td
Cls A

Pulrc
virhuvoid tut () = o 1l declu'n a a
fun chn
Ctays p: puliC *

pul'c
vol'd e F ()
Co u t < U Hello I amH t u al fun tv'om u n ' ng in

leri claj )" <c end l5


int min (voi) upul: Rulo am e
uAu ad funghin unu ny in
obj .4e r denvd cla
29032

A ile Can be
opensd in on ck kous modio Tua
mod
dta, minu owre t u ile u potiti mud D
open, and w hat hun ch'm a n allowc Ater cloMng
ale nCan uepen ta ile in q dikbeunt mocle
dspendi m ha one ù
drng
eg
eg n Can Cral Hle tn ltall no cdo
a
Can cAest t Flu ala
a d r
Aepptn i in ppenol mo dito
data i

optty
Dejmpt'hA
io in Seath tue file anod or en TE in he
ead ade mdy
( o : oul
Seaachy bor u le and opend + 1'n

Seady t Hhe tiu ano open t


e
in
Ppe nd mD de e u j moclo
allo os to
ou aPptnd e data to &e
e a tie

(f) 1of: lh kay Seuchy e bile o d open ths


in n m d
ble
to
pebom linuy npt
tput operatiim
Seaxehu f t
ble, open it and
ponthnta
le
point od
Rud g tu
elt9o3 2

) Exteptin kandln y repending to ereptin oen


Compue progam n An rCph'm octuM to ten h
unespe clzd event har rew h a l e q u r e spe ei' al otur 1
Examplu inluole a we providivg abnmma input, a Hle
Sskm e eing en Counliieel an trying to vtao
a ileo a
pegmm atiempting to in'd y zus
Exte phiv kandlin atlemp to hanolle uue tueutiinJ
So Hal a
Phegra do not Coas h.
Can be
exuption handihy
peormeod at Lot the Sotoae ad hadwan. povlm
( y)
Exuphin Prov de
provi de oay to tansked Cnbel om one
p al
Pegom to natw Ctr excuphn hanolli9 u burI
up m
hree

e an
exCep hen C
Problum Shau up -

Cat Tu cali4 Hhe Catdhhy an


handlo oweny6
ey cepti bn
L n to handle
CapsUm .
ty t u idantiie a Llotk Code ollt d sy
h n Cat h block ouU path culan excufh o
loit) e a chiveTA.
Exams ll 9o32 (1
inctuoe <ioshtam)
uing na rutpu Ce Std

doule din'in Cint a, int b))

thoo o " Divin by zao cmdition 1

3
vetn A)
3
i D
iwy o
doue 0

z = chivilbn (a,9);
Cou

Catc%i CAt cha nig)


26119»32

CR2

ndude<ioshenm>
t h a nuy pate Std
templatt <cluTS
Cta 8-tudent

iw Std ll ro
Cha stdname [oJ,

TS4d mari
puuc
vor Set. data U
Cout (e" Enti name
n >> 8td-
na me j
Cn 2nle ho:"
Cin>> 8td rdl
no;
Cout Enln mamk"
ca'n Stdmalks 5

Vofd doplcy
Cont K" Detu u:Vt endIK< Name:" StaLna me cc ehdl <e Rl nd?
kst4_roll ro Zt end C" Matli :" (
Gtd_mau ee enol l
Ener na me: Anu hu Okru
int main ) Enter Fo ll ho 3 2
Ener ank Jo
ShnRKflo at) S2 Deu l a.
St Set daa () Nae Anshd
Rollnd 32
S dislay Ma : 9o
S SeldaoC) Entr naum: Sudeep
Ene Rol|no: 1to
diptej() Enle malu: 89 2
uun o Delaiy ae:
Name Sudeep
Roll No 140
Ma su: &9 2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy