Professional Documents
Culture Documents
Data Type Part 2
Data Type Part 2
ARIA.
mic
n t e d T g tammin'y
en
vaswable knevo
knero
aiu
thén CtInitoduresa
nes krod
f ot
vauaslh
be
pLDVVOA
vasu't
Vauabe . A
leaenc e Vau'ab.
Me Jenunu previowaly
dfjid
name fer a
a
tesn ati fo/lerae
cuealrd
as
u
vauie&le y a r la 4 e- n a n m e l
Aefeyene
c e n a m e =
hefein
k
datayye
loat otal
=
e
total
totalL
i b r e a n t
Sum 5
R
oat d h c d a r e E
6
h
h
o
e
m a m e
se
k eff
e ru
e a
a l t e n a t
ue
i
V
Vau'ases
a i a s e s
tun B t h
B o t hhhi
i
Sum
s
t s / n l .
Colal mumo7.
m m e y .
atia
ble 1n
7le
The
6yec
tata
S a m e
C o u t 2 l s 7 a l
an d um
value l
/oeD.
.
value
tuhe
prmt
Lotu
The Stetemen
s
Sum=0 Ll 6 zag
zak ass
7he vastaLl
The vasla
Lot
tua yalu
wll chanse
be
inHtalized at YRe
must
Vesiole
depesenu
time sdeclasaion
b he KymbstT
adduttbnal meaning
Ctt as'g ns
addlsr herat.
H e u , 4 u nat
an
Int ntioJ
Intx =
nTio //« e alas pr TioJ
ba
cha aa
*\n " nitalíze eferena
Literal
ako allrued:
The sllon efrort au
nt
nt m- *%
t kn = 5P
& huos
Cause
m iefeu
declasaticns l)
The fxt t t f and he
laliman
-
ponts by witt
valu S
L e al
tii dn t 6hétt-
CL
(
vatva !lh u in
eyor ayplr alion bfheJeunce
asgument Junctorl.
Ine maul)
nt m = /0
funeticn Call
ftm)
3 pllaw-
Call flm) u eK-eeuttd, 7he
Lhen Th1 finetrn
initolizatron occuus.
Thu
Thu become an alrae m afe eveul
Slate me n t
ftm)
Iueh functr on Calle aue knnwn as call y eue
Sueh
Int m=l0
lo ne tocaZidn
Call
l o boo nams
ftm)
LRx=m;
OPERATORS IN Ctt
Copuatn
o p e a ,A
C Kas a At'eh get f nu pudn
C r n t w d uiey
some
vald i Ctt,
Supe 6eeotutrom p u a t r
d e c a r a t o r
membed
LS
pointe
da/ir
6
meob d sp
poime
S m e b e peAa/T
po1nu
Anleas peato
olelel Meme
endl
une fied zpsalo
Memey allocalin Epdal
Field w s h b u a t
Ceto
DPERATOR
DLUT7ON
SCOPE RE
lasgueje.
6lock stauolankd
uRe t , Ct+ zi aleo a
A vajalle
A
e Ceptar speiaToe
b e locul t lhat blo ch.
Int = /o
lockL
Block 2
dectauatien
blockL,Thata
l o ck 2 ConTainedih 7hL Kame
5The
Same
deelaatrom
hroles a
n e t lotk
C n
in an
a n
and
huepe,each
Bran Valesle
a
ann
sue block
kefr b a deent
es ion declasahen s7 z
caudu te
the ineg
block h e
Vevase
ct & data é u r
Aithin deelaod huu in,
deelaud thuin.
bte
edata rje
will kafu né- be
can
n vasi ase
veuion C a
LB
S LT
hus
huqtvbal C
Lloek.
blok.
InCC 7h* rttun he
Re twrthin
onet
ne
Callud
Gom
ecerseod
pua/o:!
a Des
Inio due a
used
can
Le
7hi
edshetén puatar
Th Sope he olnsi
h e ollosvip
takus
hidolen Vauasl. I
uno
. . yata Sle
-name
7A alles access
he glElal vusen A
palor
Valale
*iclunde K1ostiam>
ld
using 9o mes pace
s lsLad m
int m=/0
Int malul
int k m
Intm 20' l/ m /eclaicdagaie
L o c a l 6 mn s4lock
2
Cout 4he au n tudu block \n
Concl< m
Cowt << * m = "'ZLL m z e "|u"
ATuw D b/oR
m = 30
DEREF ÉER ENCnIG OPERDTORS
NIEMBER
Thuouh pontti
mem bet &7
&
nmem
be
t
to a
oa
a pointu
7o cleclau
a clas.
m e b
UsIn 3ep
access a tIRatmemby
To
peinlaa
a
ame
and
n poinlez
a
uIAJ
membey
a o nt i o h
t ha
a
aCcK
70 onto
peet anola
h e
membee.
MANA4EMENT
OPERAToRS
ths
Th n con esk) to free Aynanm/qly
NÁun
alto cathon ilyehni'g u e s
At se dynamii
memry.
Cuoro much memoy pate
advance
t nU knon
ntedra
whe P
1 u
P
2
aa
ne nt
nea float
float. 'we
Combiri the oleclatatiéón
Pona type
'thuu assgnment
as follaos
pointue and,
hed 1nt
n t * P=
*P=2S
ls the new«ly Cae ato
= 7SS as'gn 2 s
Int sbec
and 7 l s he loat oyeiY
mery
Can alco 1nitralize t u mem
the peAatar.
pornlu VaitaLle =
neo datn-pe (valus)
n P =
he intlbc)
/lo at = = nao float (7
dataype typel
Sudetaus and lasses.
u
6Ne olimencional a a y
enetal />m a
The
be = »eus dalatype Lsizu
poinb-Vaita
an auay
aMay b7 nbgeus.
lo intsgus.
s7 lo
Mealo -a
memoSpe ce r deconef
PLI& t k
Aefa &hi a* elemenA
ploJ wil
and Loen.
ele ment
rtR Na
mulhdimensiom al atays
Shun a L a t n
all t h andy si2s m u s Le Kiypple ,
aMay-pli- neo ntT37t ITu7: leg af.
aypk= ne0 1nttm7LEIt47;
amaypl =mes nt C9Tts II illepal
saypls = neo ntt I5ITv; tllepal
l a k t sampl
privalbe
datalype d1
olatr-tpe d2
publhè
manl
delete foitvajaslG
de let P
deleto ?
alto tatzdouay
tay
altoatzd
we Oant-sAee a elynamitaly
T
n7Vala
must
uithe folloss
llde PoinlvLJale
B7elemgn in h e aMY
tlu numbu
7 h S/ae Specifjes entre
lulet an
delets
CIP / wl
nE aaitasa
memoy u
In
Jn case
case hrhen kufhveot ull
null
e
ettt
iaunnt a
me
M es
o
ralloclf
allocAtreinken
Forr
pomle. es
9 advantag
tas_foltnom
ofur
The neo peal malloc
Otkeunttm malloc ()
(9.
the data
compulis heS/zè7
adomatrtaly cizeof.
6izeL.
use thu p
he peeta
atto
r
we
need ft ppinles
Bhycit. FKe
c o r e t F
mekmns
automati
cally e a
lypetadt.
P need
b
Thns ufe
s6jeet S%,Ce
Sk:Ce
c
he s
the
t 6jeet
type irtalrai
I n i b a l a i
poreile
(3)Pt
e a l i n
is t h a
p a ce
m e m o y p a c e
can
llete
and
s p u a l a n r , n e o
ohus
uKe
K e any
C
se oveyloaoled.
4) NANIPULI oR
tanu u e d A6 er
Nanipulelors at sbualorrlha
most commenly ned manlpa
waeamanipa
7h dATR duphy. 7he
- tors a erbll and cetio,
24 "n = "
<e na< endl
n 4
SL Lhould a tlu
appcai al unclu
m= 2 S 77
n-14
P lS
Heu, t nurnbes at
uikt uutited.
The Cetuw manipulatr
cum.
aitasl
the value o7-7A
p nf fes,
w i h in t
yelu ght judttfhed
3 Ss
0tam2
Includ <iaiiuam
# 1ncdude <io manip>
nameipALU
LU
u l in
n t malul)
Alowance =9S
int Baklc =
90
Ttal l o 4 t
Setolo) z
aBase" ze L e t w t i o )
Colce
B a s i c ezerd
s i t llo)<e
uAl/oroanee ' 2
setotto)ee
Alndante < < e d
76/al
setholio)<
u7tal"2
Sewlto)e
eelun Basr
A an jo yS
7YPe CAST OPERATO
(3)
Ct pemitt eyplhtub type Cnveson 7Vati'a Lles
a verae =
Sum/ CA10at) 2 /¢ tatrin
a velgpe Su)loatti) /A+ nstathen
Progam
tnetuol jesheam
ihclu ol Corio h>
s i n na oespace ctd
n t man)
Int ntyai =
S;
floatfbattav = 3 97
"
Cout< " intVai =
*nftoatval=
"
Cfloatva,
Cout
"<{loat(intv
\n float Cintvas
=
Ccout 4
Cottee"/n m-tftoatvat)=
"
e nt(loctvai);
gchl)
ole / nv a =2S
loatVat = 3B7 Ine ( l a tva)= 3
float lmtvat) -9
DpERDTOR PRECEDENCE
enablu b add meaninj t u
c t4 uu mutipl
a
and predeoten
ealos yet h e i assoceiaticn
suumon t t ame
AsO Ejatiity
pelaTor
lelr b Taht
leP o g t
.)C] poai* + pasfu-
- unuyt
pr tt prf*- unay
unauy
*
Lunaly
ctyde) Sieeanes d l i
lef
t
left t Aghs
==!=
et Aght
left &
left ts h
t == lzht left
*
=/=9:
< =
>> = l = A=/=
, (comma)
aLtume hijhe
h j h prec eadnc
precednd
7he unay
epeatront