[NCA 112: PROBLEM SOLVING USING € Intermedia eepsnttions
(it yes css os a [Tigi ett | owt —)
Nghe! ngage” reese high lef aber nat gee Tighe! npagss | ieee baquags eat | Low ie lags
Rater tan Gang wth eece, men ae dal ee EL
roviteastoveyting | prvi al bia fusins | pois tig
lng dei ules fet comple she rae eps
‘tots a foci, bape ends ck and oer shar compa sect tbe woganner nih |funinhighlovl ingugs, [ahr tan aces
‘cep wa foce chy opal Popa. ord os shady bit [but pevides ling chs |e mists
Unter bly agin Mie! anges fy ge inate at weet» price ert a
‘ncn at sae ly aes mic moped, Of ec ah nega ipa ee Sees aoe
SS Speen ene ome a ogee we wat
‘Kobe promt Outing me hat ghee! popaneig anges te =
(pene he ppm te ced leper e Braap: Ie Aavaler
dv Pybo
‘Tat mle lowe bmg He sueaiy ot mane nguge.highted
rognemng con sat he pone mace tgp tt
‘rnc telco wt hr Eng: Teepeaiy sl poof
Sa Ecce onr me a eee pgee
‘er ae the pete mode of ctor mee ied ang Tigh Lave! Language
Interpreted ie ye)
cn ech ge neon el od en
‘Stel ayy “wit to amps sug pga ed EY Aner tae]
"001001 ES
aSoneone nh cn wre compar gran iter wari, omens wo an do
conpucr pogtmmng i cll 2 Conpaer Programmer Dad on compe
‘rermnny ngage seni. we cn mies anpar popes or
yh Poganmer PHP Progranmer Pol Ps
Atgoritam
‘rom ropa pi of ew. ncn i sephaey eo
robles agen sn elcine meh end ate to welt
“hm compute poganne lis doen a he ape pind ome «pb
te wing auc Rang aspen of eget
Selngetoonie fons gent of auntes
1 Getatifnunbes 1.12.13 LN
‘Ame inthe eg Larges
“Tbe et unr fom ein te ling
Largeiteen
lags =
‘The tm ingen thn ae mediate stove ini ae:
Fn arp fir hl omer ae em ere eh an ten ne and
leer pe il a hh
eos hu wed gi Language give se peo ean teh KF:
‘ey a folio ne lloing spec ou va ach
‘Cosme
Now. ty w map e sition witha compar pgm. The above een:
‘ce uly «Har ane i ag angen ht ce
‘eho eh KFC fm ger ig pin Thi amex le be
fen Spey Hn be aye an ng eel pe
‘Seigdecon knows nyo ce page
Introduction to Computer Programming
1 you andra at conga progam the we wi ye ato wag
conpue gam: i aledcompt eamng swe mone ea. th
‘ne of poranning guns wc can be ult re cone og and
‘lomag reste tee
1. ila sae i Laretadome oat
A. erpeat ame pce sing fom sep 3
‘a toe algriin har ec sen in ue ayo ep pine ded
map ou wil come sc ore standard aye ng cept tie
(Selmore ivanell af compe ppm
Alport Pekar,
Aepabyate pce oon arcu poten ep poced or ing»
fcr pins none of he pgmming Inge. Ind te
eam ngs
seam
— ratsoe the parton in ser hc eA aii of he
‘Spetamnenan tot ton ar ar be pcm by ape pomey#
np Type wien high Typ wien a higee guage Ie
Mapa aca ar cl ig ing compte Mot npr core
‘ebm ting ing come
senor ese sardine faba
‘Teva oa ale one ange
Theva oa cota ot cage.
Where thy tera amin mea
ow dese ent te ey?
Ait teagan cain ga aon,“Arabic nmapatios heaton thememon, calli ae
Memary mp
Problem solving
+ Step
= oc | Een a
—— Flowchart base symbole
Variables in Memory corm taton
“ashton sxete] be] a> oom
70 Qe rsin os
i .s — Eat
‘| oe: — fe =~
xexs ne I = font
a
C= Seana
ye ee
TP oes em
Dat TypeData Typ
+The connoe dat pes we
“—ntger: cam sore oly whole numbers
‘Examples: 25, Examples: 3%, 86, 1,086, 1, 0
Floating point cam store numbers with fadional vals.
‘Examples: 3.1419, $0, Examples 3.1189, $0, 12348348 12348348
Character cam store a eharacter
Examples At, at,
How are the store in memary?
(Ac aunher obits vary fom ox couputer 1 acter depend on ist
set sh as 2 it peratig system 6 i operating system)
bis (ASC cae) 16s (UNICODE, sod in Jaa}
Example 2: Larger of two numbersExample 9: Largest of three numbers
Example 7: Computing Factorial
Example 11: Grade computation
MARKS 290
19 2MARKS 280
78 2MARKS >70
MARKS 260
19 2 MARKS 235
veeuees
saocerg
Example 5: sum = 17427 497+N?
Example 6: suM
2419+34+tN temsine cc omnes Hoon conto indy he we of eked
THEN ELSE nd ENDIF. The pwr rm
‘he ELSE keyed nd "sauce a ponte conden tne, eee |
‘Shefrned: ederwesequee 2 sperorme
ete
‘Donia onromemee
Dia repr tne osge
WHILE Loop)
“Te WHILE cons ne py wit na ep Ting
‘cag foo ae nal y to ayoonts WHALE we ENWHLE The
sevaliom is
“he us cn in Th “ee” pre eh
‘ection ihe aol fem etn ne anil aod be oop
onmasslenge theca
‘Structured programming
Smetaed popanmings apogriming pig sie at inpovig the ely,
gt and reopen compa program by sang exente we oe{TC poping lpg i ed for dengan apc dt ame +
‘mone of ee seme hos Wot GND dino me
iprecheag el
2 Grapes pte
spree
(Clopick st eae
np
Tho nee progeny npeges Thy
1. Mid eed ama
AME upg de rv bun etn und i bigh el
Megane ba proves l ag ace tne edi race ne
we Eeree.
2 lig Lee gaa
Hip el ane pie ent ners at th rogranier i ed
(So Sybil io sag Eames ive
3. Low Lvl ngage
{ec gt pv ing or a cet he cin
‘Seraton sc Camp Acombr
‘Sinetron ange
Seo nes ropa dln nl pops at
meter cin a pend tt pr i ie
‘Daves fy sn sna am one anne
Progr srr lows "Top bon enc
Enotes Paes ALCOL mato
‘Wii he rane age
Tats ange, pans ed ino obj
1 ime csi in hea ta i Beg opt and ston he Scions ee
pesca
‘ini he and notte aces y ener nctone
Pope stra se UP Agee”
Enatpiee Cs IAVA auCH (Cp
erste sented ange:
ere spc ae gemini gt ae: BASIC,
‘+ [ANSI] Aner Nai! Sosa, Aner Nao Sand fr
uc Praag ange C23 181989+ (Kenighn 75]. W, Kernighan. M. Behe, The Progen Langs,
‘Prato Engevond Cli NI WT. Seed ion 968
+ (ting) C+ ring Thing Mine Cop Che Ma
Se eate eract
‘he conponens oe above rt ae:
1. Mader Files: The i fein cmponet te len
1 eh Deters elles snd mao.
{ini Defies sumer: cameron fancies, pewlowanomn newark
1 pmo:
vy. rtare
wy
1 Weting et poerim:
ewe te poramin
‘aes
‘
pettus":
rum
1
ec wame te pga
Lin: | itd ain nC oa es a wh ced
‘rpepcenar wich rpropan andy camer avery
{rm eeposar aes po noice acne ogra Te pce
(polars inns wik tah bart petty oe ppc
(Biche campe epacene opt pope coe fm oe fe
‘The fleece a ies n Te ter pny in
DSS UT Deu enero
Line tt ar] a eg am wee cot
ompled progr ein xeon pay begun oot
‘mom The owen nrc eth he rat ky
Fea ah ag cate wth mcenst,
“Theta wstm te it nas im pe ma. Teva me
‘nna peg nist pte eo a
Lin Sand font) ag pi of cay hake eine scopes
‘my net ard co scene deep ee
SSralenimacry mice
Lin piesa Jpn) ast ey fon ie
‘cougar oa Teese ef pd ce ne
{Siintbn sen salvos sali cael seme
ei i ing ani
‘iinet er ci:
2 Mia Mand Dear: Tienes oC pops dear emai)
{cin Tm gat ode me fon
Shum Deze man et
0
* Ehoncwmuucriuscotcuctntelntw Pestmestaaee’
Pop accra out cd Sap Se
imag
q
4 iady: ty of fmt in Crogan este persion tw pom
‘becom canbe ane ie mnulnons cargo PS
imag
i
print
urstscmner a eur of evar snc Tar
‘Seeman rere ae Sel pe name ab tone
(terens devil tee tse td ir we il ete peo
pice
Comte
Line ren; er ent ae nom) Te
‘uray aul operas tes know erin ar er
‘Thevsoed spay mesmo em
‘erage rate pagum, wend hives comple oon ant
‘ne progam re eran ene sampler
(hei peteprace peso hep deepen atc
female wing Sopa
On Window: Tce ay compl ae rca oC
‘ogni Cais cks sad D-CP Wes mesd Ge Hacks.
im: ins sesh ihe i, Coe Blake
‘bn at ov stone an sy tna io © ppg ke sg ©
ogi isc iene asp pope i
beeen
; eee
ar tte
er centnteine
— a
~ funetne) andres 0.
i SS
‘ab propa ery plead bas program ia Corning agus. Tht
roe lo Noe apt ini, nyt
SaedaQehicacaaremme4
1 Posreeesnp Cre pg */
Spee Wot:
5 pho:
7 tent
”
[seem
elon the ep lowed ay propa ott a get cp The
‘coma 19ai€ opam sl hens nose wher 3S POPS
Fava Cyan:
2 cole
tomo
| CREATION, COMPILATION AND EXECLTION OF AC PROGR
Perit:
Tm oto cea compe nd ect C progam yyouromn fae
SUPT a ie TENE oo
= Ee tow ce cmp te ©
+ Goering yc cv cna ae ¢
«Tiere nal scone a you min, yn he eine
(Spice ni Sct oo mea ssa ny ah poe
‘es ce yap Ha rc Ce
c-Ettfoune Sep Uses Esa
(Cte Sep Using GCC copier
Since af © pop defnd pot rae cle protl, tf flawed by
feepeme ee eng © pops Alle mgr by tee het
5 aacton poe cron eon
iT ina Chase roman
in Sem oe abs
ne pe ae bag € program are
1 Cates progam by ming tet itr and he Se ed wi xeon
2 Nee te pam income. Tae may nies aa He GNU C
‘Sips net gun rpycnCopers= ppr an PE
‘pein tea nope
‘ein aage eae pig mike, mite ey war te mage ree
atte cin aad wil etpupel wih ogame an came e >
‘Fopanmne tm tht pana ee ie ees
* Pints wate Ge cleatecosins Gest tra at tcc
barny ang me sop ees an anor nce we rent
44 5 nett ogame ming te esse ee At
‘hte tne er bce uu Ge wlio tela
(Siete oer wich cmc fer andthe pope a
manatee
J] Sauce fade
Preprocessor
=z
[sembly Cade
Assembler
Link Editor
fete
Tas SF Ua aT
(+A Camanche inbelw meninaske,
‘Sete Desction
Deumenation | snpisg win genteel went be
i ‘ederedyCompleforconpion prin Tae ibe
‘ered byC copier ing compe
tanle coment nl conmen oe? cme
enki ta eee tae Cp
= Ne eddnegn te poprican Bedelia on,‘eum pe pune ames ie eto
{ery Cope sana fm man cto a hi cn
ere
‘tctration | Facto proye ges may infomation shea fini he
Tokens in C
“Totnes met inp demented ie eng» progam in Ween
Eerie Gt um Re ces
‘Sete with wag nena ne met eae» pg
SESISTE ee wen cpt ker eth eng Ht we
“opmct cei = gram ange
‘Toten Ingnage cen edie ine tong tera:
‘dg be ace the rogram Fer cumple:
Alo entr efit mute dies fm yn You canto
teu oc anh
ae fr mang enter
Avid ieniieran ae ees operas alone tes igs nd
Yorcimet we eyo ie i whe. ident
leno ng niente cate However, ou myn it res
nee cmp ft iden lnge han 3 secon
[hide mute miu Gl Nos fain,
Yoin os yma idenir yn oll te be ml however fe
essing mete makes
‘Constants in ©
Acontatin sae aon the wie vic wil ein tena oat te
‘ogame th conant var comcbe hanged
‘Tenet wep cen cot
+ Cag cont tevoed
1 Gan cn proprcenor
‘ype omar
cont —
Keywordsin € ‘ape cott Tanaka
pum pend med on npg ate pat
eaingto te comple Keyword ae pr of est md ey unt essed |
‘Sie orem:
i ey net sie en Gg)
‘eC ia casei ngage. eyo mm be wren a ern Heit
tf keworte alowed ANSIC.
w= | = | = |
= oon | wie | ome
sae | tar | |
ae |e |e |v
Identifiers in C
evr tees to ame pn enc ih ovr, comnts fans
gan Aa ese mes fone wig tance, it anand,
Aewingpeicansant M6078, 33 00
cal oa: on, 02,0
Memamaleoncart | Oca nb 06 ceInteger data type
‘nagar oingta ve mie Th ge rigs te i om
nines 2 yes which meat coma ital fina meray.
‘Nit mcr cue Phncra men Anne ate rer ed
‘nertna gprs ar shin mln
‘thn pe es nage ren gh bean thee pe fly The
Siem chee for cha pea wer aly.
“oes ti oy ed for tring malar it ied er rig erly
IEDs Stengel ernng Inge nope er
eee wan me aig de ee plas itl ene
ewe atoms peer prt nt pes Hew the teen utes ie
epoca ae eesoeger
Note in, Here no Balean data ype.
os Ser Taras Speer
ae ae Ta Sas
Sap aire oo
Tes air comal ae
on ia ‘a
seeped ng ie i
stoped ei | — le ii
ede 7 ¥
Spe om 7 ma
Tee obi wawean Dele | oth
Floating point data type
Lute ep popu west sh mae ig oie pe Te De
‘yvor oa epreat he aig pint dap. Hl oats po
‘he wih meas mer ings frond cial rig
{ate aealmuntrt conan ml pi inne pe soe re
(Sel pothensweem we fous tomer mapa fake
(SRE Sang nate nade sae el seer wh pecion wp ts ands
mesic.
We sig» aig pint manera eywertsieaalong le mabe placed
‘fen enter eva ecm se
float and double Output
Character data ype
‘arrearage
aoa” Ganege ney pening
eek acres me orm ale ce
Arh andar (hanno
Constants
Comat ava ther change dig econ of 2g,
Falwag sesh au ye ef sane
owe dare rae?
otto yn inci pe
hr]:
a5
shelter
caret aTe EW:
chee(s]2 (8H EWE:
2 Hexagon 9 we haa
‘a an oe pst
‘hero ansencinal gece oe ery ec edn
Character constants
[turaersemtaneoman ony sing hacer lone ing goo
‘1. Wecm a rapcem curs consttypoving AST wal of
Sapo es e
tone ae empl of ad arc aot
String constants
Ase oir aati iin dle es
‘Theesrtie seme aa ng cos
Real Constants
(it ise ot aye conti on itger ale, Calo proves
“ests thorn decal pi ors ron ale Theva ett ah
(SHES eg pos comm ne el cma conte sal pas na
Epon
‘ere ace ant ere gee he i ct ome,
1. By wing he ema Laer ina abled which wl maeve =
sonscmemn|
cot doe P1= 3.4
{ie i i wie ra ons te aete
(met sandr nt amber
Speci Charters
Schl Garnievin Chg
Denk pce, enn erat caries a
Special Symbols
efpym ina imc me mat
Tone
race): The peting nd nig cat bacemas headend of aac
Parentheses Thesepeci ymilare med wind con cal nd cn
cn Sc tows te til errs ppd by CA
Soe Bm
operat Dessnon an]
= [Ree eciceaalom toate [ARB
wm [Gaitacamcotmeqeamacagaiena Faces [ae
arn hen cnt cre See
> | Gestatihevanct eh prants gacrtntivneahag | >a)
operat othe cnr nese ey
= | Sei peraet ich oman naan sevacotine | A