Professional Documents
Culture Documents
A
tunthon is o
quoup o
katomes nur togethe1 to
po Orm a task
Suntan
enecutable <tattnent
eneutablt Stattmnt 2
uetuir Statrment
at detattd to funttions .
Funthon dclinitiorn
Funttion call
Funci on declaa ati orn
Funttion dulalation
dKe vauiab lu, allFun ctions in a C070
-Kam nmult be detaled, bey0Y h
ae
inuoked
A tunetion de ttaration contSts 01 tou
nats
fon i
Receutsio
tut pro cest in whih a
f u n e i o n
t jtsetE up to n number o)
times
Synta
Main
outpu
emaml 1c O} i e CuTPM on
tui is an
atn-faetovs al Cint n)
int faut
etu n C)
else
type membu 2
data-
typt em be N
namnlt
enarup tt to deund a
tutu t tov
ermntoy in an nhy
Stuct emnloy ee
int id
cha narne [2o,
Hoat salajy
is acollection O data types o
sae typeit can be int that f10at,
Syuta
datatyr
alay nameannay n2e
nample
uions
data-tspe va1 iable
A union is a
spetial
10C thaat auloo to stove dilerew
data typu in the Same mem or
(OCaion.
on-namt
aratype' memb 1
data- typt Member 2;
data tp N)
Menmov y allocation
wion emP
cha x
ttoar
Memovy shaain
ad allocatu
e C i o n v aTfauk)
t0rage
eaual to
tou by tu lalgest on.
Synta
int ptr.
Reaence opeaoY
uelueMce opt ator oftun caued
asA dd1e
ot opuarot Vinq Cam per sand ) op ero
-60¥ o th a vau ab le Juuini a me
18Ca on alio uown add eM
o 9uen
vai labI
Signtaa
jut a
ptr & a
a' is stoved
te addies ol u aliab le
In viable
De-uefelence 0pevaro y
wtot
ur a
pt
Nutl oiutt
Ä
OIth aGs no RV
no a wtn RU,
NO
aAqumunts and no letul ualL
ththun o
uncti0o has no algGumh It
does
ecieue
data tom the
calling tunttion
mi1au wnun it n0t
d0W uetuun a.
cOnt t l
enam nle
add
Output
UeN
a Ation calu is made, ony a.
Value o aigs
Pun Chon2)
tntioN
tunttjon 2 (a)
N O Tetuln
val.
#iuctude rtdi0.h?
lutegey)
tu0o
gniC2utu a
add Ca Y)
Void adct cint a i nt b )
jut um
um atb
Output:
Entu auy two iuttgss 29
fhe nLM i
Punetibn 2 Ct)
unthion f()
funtion 2 Ca
u e t u n (o)
intuude lstdio. h>
t add. Ctnt iut )
main
t y um
o iwt t eutts a tuoo uttga;")
Scant "% d 7. d's kni kq),
Sum
a+ b
6utput,
ittgeui 2 y
ho0huoo
u n it
Nto aaqumnUS but UctuuJ a u al
inctudt ttio. h
iur add CAroid )
void main )
um adà );
n t t u e Sum is 7d" Cum
P.
C nt
y
OwPut
mi 6,
t
piente
rLLntebttween Stturu
and
uon
sttuetu Onon.
th kuy wôvd Stiu tue heuywo id u
-ct is e d to -on is
used to
deyiu t t u t t u e deyine' a ion0
Tue laujet
Si2e O
It rmenmber
Memor auocated
ach e n ber
hared by
i t i n a sttu
ncluiduaj
w o t Korag
e a 0v locahion
ralle Altetiug ttue uauWe Of
a m umbev w itl noruls valus D ay
Altug
t
Other Membeik 0 O t u muwbt
wil alttu
Sttuctule
otuer nernba
Ualu
at One
Stuctue
d a t a s t u t t u t e A datatypr t a t
a Storu diyyeuntT
ensis ting o
data tyru in
colltetion OelemMe
t
nt t a h ideutii Sarne mn®r
-ed by t h . oCan6 n.
asia fnd e
a 0 st 6ove di veent:
ov
atatl emnti 0 datatyry
same data &ingie mt
ty pe in onti
uuou mumor
0 Canou
is pombe fo tt is po si ble to
acs o punu
Oa ttuetw
oltmnr i y name and h
t indun dot 0neato
O Kywovd t i u t {uwo d.
Sauh l unmut
has Tu Sam Can be diyyeetnt
t to aCCek to ae CAA
Stiucteniploy tte
nt id
Cha hame t2o.
hoat sal aiy
Memon4 atiocandN 0, t e
ttu ctl p oytu
(O04
410
- tial 9earch
kinea Seavch n e i to ind whtu
a umbei r eSnr n an auy
t its
pu then at wna Location
mle CompaA each edt m n t wIth t a
talgt elemet
nhi we rind ir
uL the.t ends
talget
tlemMr i o wnd
tumnatt The lteal
and
Seach unetin.
matcneq, npaue
#tpu b o bo th ale not
in an unauy
hent elemen
diiptayt d
Bnay Search
Binay Seavch io e to ind aM m
-ent in a SOY ttd ail aiy
IE the allay w t 0 r t , ou u t
SOYt it uring a tov tiug ttehinme
a mge oY
Atovit
Step1 peet tne mjddle eleminnt
anay.0
nspeet t
oy an ailay
0 re M
tpi (nspeet tm niddte elmand
an
ala4 o weN( ana