C Programming1
C Programming1
C Programming1
*eling a
n crdey to
tedrolgi
Cormte cich
oe poblern. you con
take o
focegs
te
PrCogomng
Computer. t think
coleyedion beteen Hurron
Programing
Compudr Code, to the act o is deline as Act urtng
stheialngbernTelisn
royrems or. tehayi thathas
instilky.
*Clangge- Cis genead-
b Demis rgoming Jongge Czned
itchje at he tel abanar
om i92.3} iso yay
bolzsho ongungo despite bomg old.
to writezAnghy aödaled
the UNIX. saith UNLX, osit
Cangunge is a
Jonguoge- bach Comngnd in Cis aa header ile. encAm tosal
C-Pogm
Al Cormond
itsel is a denction
The
Tone nain (0.
ony om is iten in hus Jencun
Ihe popom o C-on be
ove ditesrt divickd io
hdo fouy bds icth
" Commert secton
decandion 3ection
donti}ies(idale) declzhn sedop.
Node
t3ed tor Comnerdn
Conmet secion
’ ge ne cormends.
2 Fle dechntin seotkn.
Syntc incite< headc ile ronai
stáb.h stondesd nt outft theadex e.
3. aendi4iotoicblea -
Varioble-,
.
function Tomel"slotenent");
Emcin name:
Petrno.
fin hs is a endad indt
cutot emclon rome. inbst
#clude <stiot
Moml)
Pontt t"heslo");
Ren
3.
o;
Chaoches
#incluce< steio.h #incude <staio.h
int a,b t; # eo nclade<Conio-h
Yaid maimt)
yoid nam()
a 2o
b3o
J.
Congol b=lo,
5o.
C=+b:
PaansoerK
hecn o;
3.
Solba)
Sol ond Uabby met
Yent+eny
ens ooloocnce)o . goly (acm e) oyt hese
colasae Cnd dupkybokcttotalondomoud.
price ay hat aobct
GS> Red qund a
ouct, okt and ice oj hat
cadcualeQmand.
1S,
loddesilio.h
1Sox2o Netse Bal +dthy
lot aHeg
wainy
4Toe
d
"ea)
?
Jeteh
mcse< sfeiot
ncudecConioh>
cJys);
rn ("endcs the odiu-)
Son,);
ayea 3 14XX8,
pint}Orco);
3.
Consle:>
ender the oiog3
2806, 18344/
8z44/
#
Irdude 1stiot
Void
man()
#mdudestioto
Salav,adndsolag
maum
iny ("sobrg")"
d= oix125/tbo)
)
3.
Consolezaong'
nta=24000,
# jncludo onlo.h
Jbat qy, fore, ondt,da, laatt
15-o7-20)3
Bonch Sktment:- In Clongucge thore is thoee
aanch lodements
1. i)- else 2. Suitch 3.?: Conditional
" else- Hhe il statesment opesat).
allows es to þutBome
decision mking into ouÝ regorms . The
gncgal Jom ifstatemenis: -
i} (Coraition)
4 the condition is SBatemet.
wil te executed. tue(Tienzeo),
the
the stateonet toil not comiion
the gtatenent
is
be exeuted. TheJalse (o),
optonal
ás Jail.
clase, it cil e
erecute when Condicnelse is
Synta
i.}(Condition) 2. 14 londifon)
sddemerd' Glelseelemend X 3(Cndi)
saenend ; sdalemert:
stelheaBtmedt' Bcemendt
Stetemert:
3
sttemerd
3.
3.
shtened
l> Ljcad operados:
C.
Tuth saple
1
1
1
M=lo5,
1
35, P
l: n>o n20
int Q=
lo,,b=30, C= 4o,d=50, e; 1
b. I! ox 1-sto:
opexator:- This
in o cooxison ond
stoo
Scitch (ya)
Cose Valie:
statenend
tetemert;
bseck
satemerd
statement;
staBomert;
slate merdt
shederat;
#inclode
# mclude<conioh Kconibt
ehox
Vaid
h,
yod mun() mamu
cdsco) ypin}( "Enaa ca
tmt "Erdor a Nembe)'
stidh (h)
Soith(h%2),
casc. O:
a'
Even"); riqy
brek("Vcwel ")
dejault:
3.
ydeh (),
alelalion parle
paalon
Lote2/o|2-13.
Lop(3tetnox zekeitin)Cotols;- Loops cauge
toog an sto aute
tbck o oe
code eteatedly cmtl test
he cestin oogoomqring
Conidion is Jalse. Looh e csed in
The dsqp depends
kcefe isSbdemeqts. when conliticn pecome alle
Aerrimate.
2. do-hile.
1. bhile- lof- hie lootb is fae tstd Jop. tohae
cndton is jested and i tis te
tren stademeat il escudes -and qiven condition js
dsted and go o
Stnta
hile (Conditon)
statermat
whil Condiin)
shemet,
sheterment
ndemed;
-wne Aoop; Phe c. do-while gtetemen t
exectes as ong fecilied
the end e each tos thaaugh conition js tue o
the lop..
do
sodead:
sktement
ctilklcankikod:
lop. toy atetemert js any alid e stetenedt
Cond exp js on exesien thet is evakred at
the end each tos theugh the oap.
he vala1e he
(ie, Conpee cyucd to zo0) the Jop is euikcd
Since e CoTd exx is checked a the end
aloys ecuted at Jeng onee j cnd- &
Pär"z4", e);
qckh0;
3.
Do-hide lob #ncdude <stiot>
# nclude <Conio
int a=
do
wile (i=n);
leht);
7
#nchinegtdio-t> 2.9
nt e, i,n;
yoid nain ()
chsco);
Pin("Ende the mear: ")
Scan ("%d",sh);
fon(n';
3
3.
Oolht:- Erex he rounx5
22
333
4444
5$555
includeesio-t>
CeincledelConib-h>
oid man)
=1; i(zn;it)
d+t)
12
dorli=i-];j>-,-)
Pony h", )
123432 1
234 54 321
3
geh);
3.
3|23
on thres imergicrs.
aheraicoad mott,
n this cnoy all elenerds anged n
mn Jinea(oa) ond may calm,
hoan. Srikedy, on angy must te declred belore it
sl. Dring dclntin, he aize
to shecijed he aroy tus
tg to
68 53
Go 82 59
MS[le]
j6674| 4.o
oMS[2137 elmameemerk
Decbncn
too imngionl
Meeds to e
tyhe c doa js biny steyed n
the ateg.
mt no[[3=,L1,2,225;
#incude cConibt>
nt n[lo],
Void i,um 0
main ()
Chscx);
pint ("cntex the no:");
er (j=o; js; i)
Surm)
qcleho;
3.
vod raln()
iK3; i+)
Prinp"ende theno:');
3.
geehO;