c-programlama - fuat küçük ders notları (İngilizce)
TRANSCRIPT
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
1/220
JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA 9
Nmtrfbultnfm tf \lnhmtnenl imb Hmonmhhrnmo
Lfcputitnfm (L)
JNG 902H
Nmstrultfr; Br. Euit Aulua
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
2/220
Rdh phrsfm wdf ns gffanmo efr \ncpgnlnty!
JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA :
Dh ns tdh eitdhr fe
Efurnhr imigysns
Dh bnslfvhrhb tdit i
lfcpgnlithb snomig lim jh
rhprhshmthb jy suc fe sncpghsnomigs.
Dns bnslfvhr ciy onvh us im nbhi
efr tdns lfursh;
Rry tf stirt ghirmnmo tdns lfursh
jy tianmo sncpgh sthps hild biy. Kfshpd Efurnhr
http://localhost/var/www/apps/conversion/tmp/scratch_7//upload.wikimedia.org/wikipedia/commons/a/aa/Joseph_Fourier.jpghttp://localhost/var/www/apps/conversion/tmp/scratch_7//upload.wikimedia.org/wikipedia/commons/a/aa/Joseph_Fourier.jpghttp://localhost/var/www/apps/conversion/tmp/scratch_7//upload.wikimedia.org/wikipedia/commons/a/aa/Joseph_Fourier.jpg -
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
3/220
Jrnhe Dnstfry fe Lfcputnmo imb Lfcputhrs
JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA 0 Dhrcim Dfgghrntd bhsnoms tdh enrst pumld lirb
rhibhr. (Prforics irh wrntthm nm pumldhb lirbs.) Dfgghrntdstirts i lfcpimy tdit wngg hvhmtuiggy jhlfch NJC.
9> Kfdm Itisimfe (Xmnvhrsnty fe Nfwi) jungbs tdh enrst
bnontig lfcputhr. 9>25 K Prhsphr Hlahrt imb Kfdm Ciuldgy (Xmnvhrsnty fe
Phmmsygvimni) jungb tdh Hghltrfmnl Muchrnlig Nmthoritfr imb
Liglugitfr (HMNIL). (94000 viluuc tujhs lfsts $800,000)
(Zffc snzh; :0c x 80c)
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
6/220
JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA 5
Rdh HMNIL Lfcputhr (9>25) I \lnhmtnenl Liglugitfr (:000s)
HMNILlfugb eumltnfm culd eisthr tdim tdh ducim jrinm, nts
lipijngnty wis stngg gfwhr tdim i cfbhrm slnhmtnenl liglugitfr
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
7/220JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA ?
9>89 Hlahrt imb Ciuldgy jungb tdh enrst ohmhrig-
purpfsh lfcchrlnig lfcputhr ligghb Xmnvhrsig
Iutfcitnl Lfcputhr (XMNUIL)
9>8? EFZRZIM ns bhvhgfphb is tdh enrst dnod ghvhg
gimouioh
9>84 Rrimsnstfrs irh ushb is swntldnmo bhvnlhs nm i
lfcputhr (NJC ?0>0)
9>52 Rdh enrst lfcputhr usnmo nmthorithb lnrlunts ns
immfumlhb (NJC ?8 Rdh enrst cnlrflfcputhr ns nmtrfbulhb (tdh
Igtinr)
9>?8 Rdh enrst suphrlfcputhr ns immfumlhb (Lriy-9)
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
8/220JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA 4
9>?? Prfbultnfm fe enrst Ippgh Lfcputhrs
9>49 Rdh enrst NJC phrsfmig lfcputhr
9>4: \um Cnlrfsysthcs nmtrfbulh tdhnr enrst wfrastitnfm
(\um 900)
9>42 Ippgh nmtrfbulhs Cilnmtfsd, tdh enrst wnbhgy
ivingijgh lfcputhr wntd i oripdnlig ushr nmthreilh, usnmo
nlfms, wnmbfws imb i cfush bhvnlh
9>>: Phrsfmig lfcputhrs tdit lim dimbgh cfrh tdim 90
cnggnfm nmstrultnfms phr shlfmb irh sfgb nm wnbh quimtntnhs.
9>>2 Nmthrmht (9>?0) imb wfrgb wnbh whj (www)hxphrnhmlhs hxpgfsnvh orfwtd imb pfpugirnty.
:000 Phrsfmig lfcputhrs wntd cnlrfprflhssfrs lipijgh
fe dimbgnmo cfrh tdim 9 jnggnfm nmstrultnfms irh ivingijgh.
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
9/220
_dit ns lfcputhr6
JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA >
Lfcputhr ns i lfcpghx bnontig systhc. Lipijgh fe phrefrcnmo lfcputitnfms imb cianmo
gfonlig bhlnsnfms
Prflhssnmo biti umbhr tdh prhbhenmhb shts fenmstrultnfms ligghb lfcputhr prforics
Igg lfcputhrs lfmsnst fe
dirbwirh, tdh pdysnlig hqunpchmt
sfetwirh , tdh prforics gfibhb nmtf tdh dirbwirhtf phrefrc lfcputitnfmig tisas.
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
10/220
Lfcputhr Froimnzitnfm (9)
JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA 90
Hvhry lfcputhr dis tdh efggfwnmo dirbwirh bhvnlhs;
9.Nmput bhvnlhs; ahyjfirb, cfush, slimmhr
Nmput nmefrcitnfm tf lfcputhr
:.Futput bhvnlhs ; slrhhm, prnmthr
Futputs nmefrcitnfm erfc lfcputhr
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
11/220
Lfcputhr Froimnzitnfm (:)
JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA 99
2. Irntdchtnl imb gfonl umnt (IGX)
Phrefrcs irntdchtnl liglugitnfms imb gfonlbhlnsnfms
8. Lhmtrig prflhssnmo umnt (LPX) \uphrvnshs imb lffrbnmiths tdh ftdhr shltnfms
fe tdh lfcputhr
5. \hlfmbiry stfrioh bhvnlhs (Dirb bnsa, LB-ZFC,
BUB-ZFC ) \tfrh biti imb nmiltnvh prforics Ldhip, gfmo-thrc, dnod-lipilnty stfrioh
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
12/220JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA 9:
Cinm Chcfry
Lhmtrig Prflhssnmo Xmnt(LPX)
\hlfmbiry Chcfry(Engh \tfrioh)
Nmput Bhvnlhs Futput Bhvnlhs
I lfmlhptuig strulturh fe lfcputhr dirbwirh
Lfcputhr Froimnzitnfm
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
13/220
Lfcputhr Froimnzitnfm (
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
14/220
_dy bf wh mhhb tf ghirm imy lfcputhr
prforiccnmo gimouioh6
JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA 92
Rf ush i lfcputhr fm tdh purpfsh fe sfgvnmo sphlnenl
prfjghcs nm fur irhi fe hxphrtnsh.
Rf jhlfch i offb prforicchr.
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
15/220
Ryphs fe prforiccnmo gimouiohs (9)
JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA 98
Rdrhh typhs fe prforiccnmo gimouiohs;
9. Cildnmh gimouiohs
\trnmos fe mucjhrs onvnmo cildnmh sfch
sphlnenl nmstrultnfms
Hxicpgh;
+9+9:00:?20:?
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
16/220JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA 95
:. Isshcjgy gimouiohs
Ducim gimouioh gnah ijjrhvnitnfmsrhprhshmtnmo hghchmtiry lfcputhr fphritnfms
(trimsgithb vni isshcjghrs) Hxicpgh;
GFIB JI\HPI^
IBB FUHZPI^
\RFZH OZF\\PI^
Ryphs fe prforiccnmo gimouiohs (:)
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
17/220
Ryphs fe prforiccnmo gimouiohs (
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
18/220
Ibvimtiohs fe Dnod-Ghvhg Prforiccnmo
Gimouiohs
JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA 94
Zhibijngnty; Prforics irh hisy tf rhib.
Cinmtinmijngnty; Prforics irh hisy tf cinmtinm.
Pfrtijngnty; Prforics irh hisy tf pfrt ilrfss
bneehrhmt lfcputhr pgitefrcs.
L ns fmh fe tdh cfst pfpugir ohmhrig-purpfsh imbdnod- ghvhg prforiccnmo gimouiohs
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
19/220
Dnstfry fe L 6
JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA 9>
Rdh L gimouioh wis enrst bhvhgfphb nm 9>?: jy Bhmmns
Zntldnh it IR&R Jhgg Gijs. Dh ligghb dns prforic is L, jhliush it tdit tnch, J
prforiccnmo gimouioh wis igrhiby bhvhgfphb !!!
Nm9>?4, Rdh jffa Rdh L Prforiccnmo Gimouioh jyJrnim Ahrmnodim imb Bhmmns Zntldnh wis illhpthb is
stimbirt efr tdh L.
Nm 9>4
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
20/220
Dnstfry fe L 6
JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA :0
Nm 9>4>, tdh lfccntthh ipprfvhb tdh IM\N stimbirbefr tdh L.
Nm 9>>>, tdh IM\N stimbirt wis upbithb.
Rfbiy tdhrh irh cimy L lfcpnghrs. Dfwhvhr, igg fe
tdhc suppfrt tdh IM\N stimbirt.
Rdhrhefrh, igg tdh prforic thxt yfu wngg ghirm nm tdns
lfursh lim jh lfcpnghb jy imy lfcpnghrs rummnmoumbhr Xmnx fr _nmbfws fphritnmo systhcs.
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
21/220
_dy ns L6
JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA :9
Nt bfhs mft citthr sf culd. Rdh ncpfrtimt pfnmt
ns tf ghirm tdh gfonl fe prforiccnmo. Fmlh
ghirmhb, nt ns vhry hisy tf swntld tf ftdhr
prforiccnmo gimouiohs.
Ghirmnmo L, dfwhvhr, bf divh shvhrig ibvimtiohs.
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
22/220
JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA ::
Ibvimtiohs fe L6
L ns tdh gfwhst dnod ghvhg gimouioh.
Nt ns tdh jish fe cimy ftdhr prforiccnmo
gimouiohs suld is L++, Kivi imb fphritnmo systhcs
suld is Xmnx.
Cimy gimouiohs wis bhvhgfphb jhefrh imb iethr
tdh L wdnld irh eibhb fr mft ushb mfw. Dfwhvhr L
rhcinmhb jy prfvnmo nts ncpfrtimlh.Nt feehrs cimy orhit gnjrirnhs.
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
23/220
Lfcputhrs jrinm; LPX (9)
JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA :
/*Nmthohr vs. egfitnmo-pfnmt bnvnsnfms , hxicpgh fm efrcit sphlnenhrs*/
#nmlgubh 7stbnf.d=
cinm()
{
nmt nmtVmuc9, nmtVmuc:, nmtVmuc
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
67/220
JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA :0
I symtix hrrfr wngg fllur ne tdh twf sycjfgs nm imy fe tdh
fphritfrs 33, !3, =3 imb 73 irh shpirithb jy spilhs.
3 3 ! 3 = 3 7 3
I symtix hrrfr wngg fllur ne tdh twf sycjfgs nm imy fe tdhfphritfrs !3, =3 imb 73 irh rhvhrshb. is nm
3! 3= 37
Bf mft lfmeush tdh hquignty fphritfr 33 wntd tdhissnomchmt fphritfr 3.
Jungbnmo i eumltnfm imb cianmo i eumltnfm ligg
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
68/220
Jungbnmo i eumltnfm imb cianmo i eumltnfm ligg
JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA :9
/* Liglugith im ibbntnfm imb prnmt fut tdh rhsugt */
#nmlgubh 7stbnf.d=
/* Rdns eumltnfm ibbs twf nmthohrs imb rhturms tdh rhsugt */
nmt nmthohrVibb( nmt x, nmt y )
{
nmt rhsugt1
rhsugt 3 x + y1
rhturm rhsugt1}
nmt cinm()
{
nmt suc1
suc 3 nmthohrVibb( 8, 9:)1
prnmte("Rdh ibbntnfm fe 8 imb 9: ns %b.Wm", suc)1
rhturm 01
}
Rdns ns i eumltnfm ligghb nmthohr ibb()
tdit ibbs twf nmthohrs
Rdh eumltnfm ns ligghb imb ncpghchmthb
nm cinm () eulmtnfm.
B n n C an
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
69/220
JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA ::
Bhlnsnfm Cianmo
Rdh prforics wh divh jhhm wrntnmo sf eir whrh
sfchwdit bugg is tdhy whrh igwiys efggfwnmo tdhsich shquhmlh fe nmstrultnfms.
Fmh fe tdh cinm rhisfms wdy lfcputhrs irh suld
pfwhreug tffgs ns tdh eilt tdit tdhy lim bhlnbhwdnld nmstrultnfms tf efggfw bhphmbnmo fm sncpgh
lfcpirnsfms.
Nm L gimouioh, tdh nestithchmt dhgps us tf wrnth
shochmts fe lfbh tdit wngg jh hxhluthb fmgy umbhr
lhrtinm lfmbntnfms.
Bhlgirnmo ne stithchmt
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
70/220
Bhlgirnmo ne stithchmt
JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA : nmtmuc91 /* enrst mucjhr tf jh rhib erfc ushr */
90 nmtmuc:1 /* shlfmb mucjhr tf jh rhib erfc ushr */
99
9: prnmte( "Hmthr twf nmthohrs, imb N wngg thgg yfuWm")1
9< prnmte( "tdh rhgitnfmsdnps tdhy sitnsey; ")1
92
98 slime( "%b%b", &muc9, &muc: )1 /* rhib twf nmthohrs */
95
9? ne( muc9 33 muc: ) {
94 prnmte( "%b ns hquig tf %bWm", muc9, muc: )1
9> } /* hmb ne */
:0
:9 ne( muc9 3 muc: ) {
:: prnmte( "%b ns mft hquig tf %bWm", muc9, muc: )1
:< } /* hmb ne */
:2
:8 ne( muc9 7 muc: ) {
:5 prnmte( "%b ns ghss tdim %bWm", muc9, muc: )1
:? } /* hmb ne */
:4
Ldhlas ne muc9 ns hquig tf muc:
Ldhlas ne muc9 ns mft hquig tf muc:
Ldhlas ne muc9 ns ghss tdim muc:
(lfmtnmuhb fm mhxt sgnbh )
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
74/220
JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA :?
:>ne( muc9 = muc: ) {
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
75/220
JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA :4
LIXRNFM\
Bf mft i shcnlfgfm ncchbnithgy tf tdh rnodt fe tdhrnodt pirhmtdhsns iethr tdh lfmbntnfm nm im ne
stithchmt.
Pgilh i jgima gnmh jhefrh imb iethr hvhry nestithchmt nm i prforic efr rhibijngnty.
Igtdfuod nt ns iggfwhb, tdhrh sdfugb jh mf
cfrh tdim fmh stithchmt phr gnmh nm i prforic.
Gfonlig Fphritnfms
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
76/220
JNG902H NMRZF. RF \LN. & HMO. LFCP. (L) jy Euit AXLXA :>
Nt ns pfssnjgh tf lfmmhlt gfonlig hxprhssnfms usnmo gfonlig
fphritnfms, wdnld usuiggy tiah tdh efggfwnmo symtix;
G9 7gfonlVfphritfr=G:
Dhrh G9 imb G: irh gfonl hxprhssnfms imb tdhgfonl fphritfr
lim jh && (imb) , fr||(fr).
Rdh rhsugt fe i && (imb) fphritnfm ns 9 (truh) fmgy ne jftd
gfonlig hxprhssnfms (G9 imb G:) irh mfmzhrf (truh).
Rdh rhsugt fe i || (fr) fphritnfm ns 9 (truh) ne fmh fe tdh
gfonlig hxprhssnfms (G9 fr G:) ns mfzhrf (truh).
0 && 0 00 && 9 09 && 0 09 && 9 9
Rrutd tijghs efr && imb || fphritnfms;0 || 0 00 || 9 99 || 0 99 || 9 9
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
77/220
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
78/220
()
902
; .
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
79/220
R
.F
.
N L ,
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
80/220
R ()
J \
D ,
.
() (
.
E ,( 7
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
81/220
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
82/220
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
83/220
( )
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
84/220
()
9< 9>
7.=()
1(" ; ")1("%",&)1
("I ; %", )1((=39))
("
98
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
85/220
R
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
86/220
R
9< 9>,
!.
7.=
()
1(" ; ")1
("%",&)1
("I ; %", )1
((=39))(" !")1
(" !")1
(9
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
87/220
7.=()
1(" ; ")1("%",&)1("I ; %", )1(79
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
88/220
(:
(
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
89/220
7.=
()1(" ; ")1
("%",&)1(79
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
90/220
N (++)
B (--)
P
F (++l
P
F (l++
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
91/220
N l 8,
prnmte( "%b", ++l )1/* 5*/prnmte( "%b", l++ )1/* 8*/
N , l 5
;
++l1
prnmte( %b, l )1
l++1
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
92/220
++++++++ ++i++i++i++i
iiii iiii
iiii
++++++++ i++i++i++i++
iiii
iiii
-------- --------jjjj jjjj jjjj
jjjj
-------- jjjj--------
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
93/220
F
.
B
.
N L,
.. , .
R G (9)
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
94/220
R G (9)R
R ;
()
L
9. R .
:. N (),
.
< N ()
(9)
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
95/220
(9)
391
(78)
(: % 3 %:, , :*)
++1
: 9 3 :: : 3 2: < 3 5: 2 3 4
M ,
( )
E ,
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
96/220
C
. R . R ;
N E ,
( (
).
:
. N
( )
1
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
97/220
391
(78)
(: % 3 %:, , :*)1
++1
( )1
(9)
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
98/220
(9)
7.=()
1
(301781+3:)(3% ", )1
("I ; 3% ",
30
3:
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
99/220
61
(301 781 +3:)
030
N ( 7 8)
...
+3:
:
N ( 7 8)
...
+3:
2
N ( 7 8)
...+3: 5
9
:
-
8/9/2019 C-Programlama - Fuat Kk Ders Notlar (ngilizce)
100/220
( 3 9179?1+3:)
(%, )1(=8)
3 + :1 /* R */
9