Vous êtes sur la page 1sur 78

fr

ceiufifre.

qqnT c : ftilgqq*f

ftcerqfr(
q q{rlerrBm'F
c{ffii6{-{ $<lcq ftfra qxqffi q.fl{r{ s-{t {}$ 1 :{Irqil
cEtqtr;K ,q-$ cqtgr"K nFreBn<-s slsl{ cqw{ iEfr

smq I ffil Rc-{ ,c *6ts s\r sffiR c.ewfirr srq-t


wtRTs qmeq \ilzh*< qe<r fi sRt q.ffi+ STRT r Fr
sffi{ TRTil Ew s fiX sr<!-{ utsr{ qF$ afs:fi:inr r fr
c$Eilfrs. qsfs sM fl-< q-fl ,{t sr{.f{ Rfr'q1* rs Slxrfr.s
vtn"it, fr r".KK eeJlql-q m*|ltFrq, fu.stfiyt sc. (qwffi-d
.( * qqq,
-g<s, cql-$.rq s c$RlE fficn<e,,
't-J.E, Csfi
.{'Weq"lq', fr-est$, t{"t? -TtEts"F dBrsts,
conditional
dtsnf, roop, array, funcrion q'*rcd e'r{ Elg s t Ec$tqE r qR frT-{srET Jicx? e sqffiffi *"*
{cs-cQ i er\5jf"it!r$!"f@ cs,,eE scrK r$ 6ry6qfi$F}lHftxffipFrqzpqqqq q",$1iF{-rs qr{c{
r

Fmqrq
: r fr cqwFT(slEt"q-{cdqrfip n,ils(<
e. r fr cetfifuqsl3TT|{qK'<16T CqH|{qq\sT-{Cg- ei|{r{
s r.Fiz"er$NTr{s-ffi {t<i:s
e i fr TEFfI'fl'qceK <i<qH :R.*rc- eff{r<
a r fr rcfqrcr wJrrg{ <rda-{ aR-t-E "i]{f<
,g r ft rsHleqqRtrd-{<rqqmo-{rc
'fl-{rq
q r fh c$HlqEr{qtsa-m ryclTliqHF{<q{'ro
4;s6E,

a.q fr caFrlfrq.gtqt

fr en E?-{-q {6{q Dennis Ritchie, ffi "riqefq Unix qtffiq


Fr#m DEc pDp- t t cqFrm 'fi' enrtui- T-K{ I .fr' e,l15f-rE

il

BcpL -'$cqr,ssF rffiiia q$ (elr$. rT tqlr$-,fr, qtcq. q"K


erF smrs Ev-{ xtD q<( 'R q< etm{ t-$-{ qcql ,fr' sFt<
Esr<s:T$fTrg
r

.fr, qT effif
r olrn
S16 qft-Tf {q-et6 t nl-{ r'rq
qr, qsfr $q.f 'g' qqq-{rR I ANS| C qmt \ffi FeuFfr
I
ANS;
C-* u*,n *u
YR
{fr{ft cnsrr qmkE I p6q <r{{]TotftT.t ANS| c <r{qr srrs sF rer<, uluRT{-flfr&-u q-.7
qqlN

'fr' Jlf,<-dq {6sT Unix qfl-C<6(. ffim

* **

"r.T
*frY fr ffird{ (c User's lntegrated Environment) {E,FE s qs rcI-{qq.s;
.ua ott,

rTlq-r'k $<l"flks-sf qq;q

mFqTft furno C 46 ,!sF o*t*um f"A #


'fr'-ro q${S sffiilT elxt Rc{c< qRjfis re-{t qTr I st(6t .fr' fr-m
nRFrsf Hardware fitr-q'l.
Fr{ (qHlq ?sR p-st sl{ E( eR}K cqTEFafr mr q:rftT (Frexibre) qs i ,hi qK *t, il i*"t
mrn-< H-dI Bortand

a,\q

E"lt\s mFfffiiel{fu

Rfrn q-{fl{ qrq\e 6sBf brtqeft-< m'fls-{ e fr${ qst trqq r -eRlvt ffi 1ainary digit) "ff16{ s<R.
qs q1t!) frc{ QqFe T<q1r rg qq5{"f (\o?tt
TftSB1E q@-{ (Address) s 6stT <rEF (ufr Rct
qqs qRO <KqlT o<f< {rs..pl sr{. frc{.cq
ReadAiVrite) s-fi {Ft, sT qrs Assembly Language-e 'T
qufis qtc"q
eQ rrcE qfr{F Ffsc.f q?f{ 'fr' cqf{lfu stqt
r

a.a..) frsrqm cqHmegiffi qT.rff{ <:=icn


q<f qcEtA rmm rEFm ffi <qrs q-q]" cKKqs sn-sB q$ eRrslq-{ I
r qffi celsNEETn "ifrrs{
r

-v'Fl

frfuuntreRr

qftgc
fr stslT ,etqlo En36qg ci-.Tf ffirq {q.{ ffir{"l I ''{F- fiB, <ltF, r{qR, q$s 'e<q refi fiQ"f
r rn':q-{ fr cewcq-{
qr]fr frrs "{Ift"|gkE *tr."t {l{ r dglTr qr ql ,4:Ftft{-s rlvfffi{ ;|'fi-K
rg
+r-$m
ETttKR
tFl("r{,
$fu(
main0 q.fs.F{F <1qqs {* r fr vW{
{H?qft$afre rfrs1qmfrFtq ec c{Fi'fi-{ cqp1q.rq{T flFftq'flqftqtR1-T

dffi<

dffi

;**t

a.a..q

fr

cerBnfu-

op,.g6m cqg1o

ffi{

sKK

qrqt<Gr B<fiE

fi.stqt qr6 {rpqr{' "mF e<( o,STmt qqn"Trsrq r fr

yklffiffi.H"q"n"mr<
.

ffiFlu

smrE

ceT$Naff${ Lc<( ss
qft RmE-"{cq'r-rll-r qqfn fr vtstT frFls. cqHlT qn nffitN cerrs \{-{r effibtcn {E qqrqq
qtq"|gT T-{t Tm I oKt qF m csr{ Q6eil'lc{ qqcit ?l.lq {f3TlF "nlK
fr g.RI Frqrs <fto ogr< sn-sl Klcer
qfsi {R"i
ft snt eo q1 ,qre.tfts fiR*l{ frcI {S\s qr qFF en qt entR's cfiBcrB <t rqWfiR

crs*o*..rfrqsrrffis

.
r

. mk qc{r r-R.t{ atr$F qRT fu' qr{rq T'l\-t{ c{fi q-<'BA arfiI5 << dt qrEt mainO
c{,q6-q cqqrc{-{ Fr{n eeq-q
r fr sTflK q6$tr sryt{ E"tFTt"{ qcDq .flt6R rfl\"H r qoF qF{k"f til?33fr vli-lq <uq
r

T1\rier< qSqR-m fr fi1-e1lt EFCR fq1qr<$ BrA'<i +-E1 Er


qRE
fi"s-Wm esF qtqK"f B"nq|{. q6q Header eltq I T{cF-cr "a{-slft Header

printf0

t'{

stdio.h

r ffiflq{

q?F6r

r fr s]{t Plq (Space) q,{f$ F"cT r qdR eF dffi


c;l{

q'lt(qK \KqFt, Tt(rl(q-{

qrq

$q ig]lfr qFrFI

a]-

fr++ cetUtRsFqtft?
fr++

el$ {l fr glqlrs &fr orn )bbo {'f6{-{ cdM-f{ frr{ Bjarne Stroustrup
qr
qt
omq t fr++ cqHlfrq sl{lm fr cqwfu. vwr< q"trr6$ <ftss"f TET

qcql qL<-sF cqwRs.

ffi
qffiv

mq Er|<m?ftp
qfts q{6EA'
kfi?r qRt<FF5 srt qcr(q
sfiEr {Rr{rtElstnf{q I

Q.Qb

fr

cqH'lfrr vlrilT <Gtr- cqH|{.

fr++ cqHft<

fr

celatfil.

frc$ilfiRsts1

w<ffibqffis'

fr++ cqHtR smr

?<fib

fr q<R.fr++ ea EcfffiXfrRst<fiAnF 6e1-5q g4sE1sffi cqsit T+rTqr<r fr ,sn csr{'Gft a w+m? of r eF qqerFo q<! q\r61q-wk< qffie er r \n"Kfrr<F'fr++
qcEq.{cq6

'
.
r
r

fi++ qr
srTqf

qT ofhrsT frRfi e{ r fr eT otbtc$, vff'nqq6-q \otcq-{ q(.f


Ec'rqlT fr
R6qr{ eftrf

fr_ qT

t{"iB u wfGE$ Eiltlgfr Gfuo.s<( a.fRrtTqrq3 \ns-qfuT :[Kr6T ,ffi r1Tfrs qfu-sf
{ffis {s r fr++ er tmb e<\ qtGDS cin <i cout s'rtrg-{ $vrr uf$\o
fi ea Bt-sfB* q'tfcflF (Top down approach) <rs6q | \nHlfrrn fr++ er Rrrrq <?T-qT't
r

qnrqlF (Bottom up approach)


fr Tl\*l{' sq<rntfu. qqds rtr 4i r c"frmFq s'RTfl&. qm erF qfrTT csrtrn'<iqqrd$Tft
T\io qcqr 6siT
t"lT &fr ors reR.fqqTrq< qt q| Ec<tR=r &A qUrq
qr
r

/LL

r
r

rgffi

qffis

ir$n

fr cs rxmbK sqslli w1fu54 Q6r*u fr6E q6q 65s rrf fr++ qr cs-rq s6 ql
fr 6r cq'i rerx-o-<r< csl{fE ffil<m cqtRs qre qtrK r fu'vt fi++ e q:{qG +ffi qI

frWErqlgk

qfiTRn fr ceFINK fr ffi


qtffi FRrrffi <n"ro qfrn erqq <Frfir r fr vrfl c"FIK q-{r ErDl
qcfqF
qrfi ftffi firsr fr sTTl r.Flf r qt{ frffi qrqt fr Sltqd 4l?.6R{ T'IRT{
rfr'rq Frrrq r
ftsTt< <K{T Gt-cs E{ sl cFIt I ERKfr TR.l+qq rffi'{-stcq d$tgr[qF {s-{s{ F<kr
"m& sT{t
q<( E-ffi-{ c'ttrFaq rr
qqT
csfrs
ffi{n-{
cfitq
Ks
T-fi
cEHF{Krri-{
Etflq{r{trB'
$q e<g{ r fi
ceWR< <nsf< qv* ffiRs p-1ir1-4 qKqlT srt qr-

.
r

frsrgtdqir<R

frcs{Mre.-fiTt\"Fr rg
c=[IT'|r{K {t{rc{ Tl\.|{'bsfr oRrs ft.TETqqq

qlefi-<r{f

ftst

dR.lq ?oR< 1firr qrqt et cr erf-s'r6qF wat fr-sn< Fte' s'r{ g qmr slT r qcu Fl.[st fr
c$.lv {fus-d-E qs,:r\9_rqs{q s?tRt{ r vr< q-{frqt <-qr et C{iEq-Tl$t{ffiT e<(Vdr6{ c<Ft
qTTI <rr ql I <fr frqI{FI FIR'I{ <rcqr* S-{I qr s-6{ 5zF
"trsgFqT (re-inventing the wheel) q-v Fd'f
qtr{'t
c{F
eNst *r-st6 T'R.tTqq rsrqskK cER$ qs q<( RFrqs slR-lmx {F w< ANSr C
unftFO T.m {p'fiqr{ <r<igs TlVFcTq{ qo ft-{r4 wK qcEt fr
'lt\3Tl Tl{ I TKK"f
arltcgR r qne cQHlqKm< Tt-q qws rrqg qrrR, ot<"t et v-f$r-{ng cEEtFKcr{ qrp{ET
$-r.o
rrqrflsl om I sfrs $Tlg^l1t qlicR sR.t{' q{furi\5vlrr fr g.l{l{ q(-t Ts vqffPr qTq-< ANSr c
Frc#cq ;nig:n sTT I printfo, scanfo <( pow0 toilfr T-l\.t{ qrq| fiIE Nt qrftrgR TR"tq

ffirx

ffi

aeb

il

\oqf

\B

C{l'fir{H qnfu

qs1\rffffi6qsl-?f rFIAn
qlqKRK rq flRqqTq & 4ftER-{ q-$E TR.rtrK q-{i' Ftqfi cqtbFTq{ ffi"f T"rd r'{t
q61r ffi
qqt"K* rqul- TIQE <qT qsit (qptcn srpilt{R-{K nrr+ wccrqs fi&{ fltffi.ffi
qft6fr-a-8.1r{{ se.lfc{q "it\BRT Tm I q q:FGT pfiF .6 eqds{s" (extension) I # include Rqrqq-*
q-s\{F' l qr r urt?reR FR"l4 sQtlq?lgrr{ qRumql T-{F
stRCKffis <I{qr{ T-Gr q q-+q T.RE cewN
fr sF,fRq|K TlEfqq{(q q qTq \e-ef <f<rqkr qc< r q{tfi-o TJTqs cqqT TFn q[E stdio'h I C{
sTffis qe qttqrs q-s-qo or< EI qcfl#incfude<stdio.h>
tflR r eq sf-{q q[6q # include
Ectrffu 6{, # include gltr<,ffis mfrrofqcq-{ !'Fl,rr 6$r qs
fr
sf cqt$frq <|Ti iT(w.tRs nqrcs eifm I <( {F
fi-rNi qT <t ..qTF
,{sE qrrq <r fro{trror Rm[< T]-q s-cit
,a"ilrq"

ffi

rSffi

6Rq' c.q.l s frT


:

,...

printf

scanf

.:,;t

ffi

altKftqRli-q e sT

1..,
". -This
is c
printf (

inL number;
printf ("nunilcer="

Program"

setch

aaf
rLr
YUuu,,

getche

sqrt-

Pol^t (

<stdio. h>

char str[70];
printf("Enter a s[ring (1ess than 70 chars):")
gets (scr) ;
prinLf (scr) ;
printf ( "Welcome to c Proqram')

<s tsdio . h>

scanf ( "8d", &number)


gets

;#

h>

<conio . h>

/ I
\ / ,

<conio . h>

char ch;
prinLf ("Enter a character : ")

<stdio.

()

s5=getche ( ) ;
float answer;

answer-sqrt (2 0 . 0') ;
printf(-*f",answer)
inL a;

<math.h>

<math. h>

a-pow (2,3) i

strcpy

printf("td",a)
char strlB0l;
sLrcpy(str, "Good"

<string.
)

printf("ts",str);
strcat

( )

strcmp

()

h>

char str[80];
strcpy(str, "Good" ) ;
strcat (str, "Morning" )
printf ( str) ;
printf ( "8d" r strcmp ( "We1come't, "We1come"
Q.9o

<s

tring

h>

<string.h>

fi

fr cqwfrr

ffiKq

c.q.e fr

v-mnr cqPlm Engq


fr smr< cqufin qRr<rf ccrq cqwqffi

rg

fr{rq

o-at-<

qqr e (q-T)fr {H <rrrq r q{f qrql-

{Ff ) : c{Ftlq:Pttq4t
effir<.{ qrqrrqj'rEFtNl{
cryrsstR 6lr<sT
t,I

ffiT

Edit

cqwT }tt't re.r<-+ q<\ E[TrqqqTrylcr cv$<n sGFr r ,qret< cEFm


ftrT qq(s.t Tr$t I fr ceWT rFRrqT 4lq
eqctfi-ag$ qs

fr

"cpp

{tolq:ftqrcq

Preprocess
I pr"p,o."..
l<.*E

*trk* ststT ffisRs q\erK qffi s-q.ltEK "wsfulgtm R-q6{cr cqWT frdR
q
s.r{ r srT ft Effiffi frrrF iFqlg' {ry{ Trf,{ I ,{Q sTrsq{qrs fterqc-{ slttr{fr"- <-qI qr r qfr
E"{ttc6rfi 4f qi3p-qrffi qmt cqHIcq<r nX "tRdsqlws +M qFoIIqrdT frcrf{ enq g-c{ | q gFdt
te-R s-gf cqH]q

qRurq-qs-o orcq FqfrRMfrlRcTq q-s-W64'ft9re-"tt{-qo-<rs qc{ cqt Tlftqr qrcat q-{t' fiQE q-s{F s-fi
RG{<-oq figDfrc3t{crf o;qqepUqqo-st

r
.

{rer\r:T-fltE

Compile
lGil"-1._---*Fj-,1*]

cQ]El{T'""i'RE (compile)<lq(s-fis-{ce (qHlqFrsrls effi44594 I s-"fltdflir<tqrc-qn-oftfr


cEIqWm oFfq q$ cdrs" <l q{csTB crlrs w$q a6a qqq fur$' q(Kqr6l T-G;t
I

wra,6pq

Link
[Lil.'k-l--t@

fr{rK ffiFa s1$ csts st q-{6qt rslrc-{


r{lof C

cnq

Etffi +.R[qrxrsFt<tfrcns"K

, 6qP;

(EHlTCo fidfq o-<n qfc'rf c{Ffi:qBro q-{rBt EeftN

F"d-l --t

rf nfu65

c(<T"f Grcu qr< r ebt ffiMl-r+{


cRrru cEpttqr$ G-q' cqrco cqrR $ 1fu6s q'l{ts-{
s'c{ | cqElqFc$ rr{T-st n-scs rRl6 clQ<ft cqro
q&Rs B"ttraRrs mfs T-sf qT
cq{R

s , iEHNfr{R
c-{rrrm sffi?t{ q{ fifitB q<
esFqtqfttrri cqw{fi-drqq..r* qr
$of

ffirq

\e)

.t

.--.--\

il

t----l

[ ?'.n
CPU

s"f c{-f iir{tq eTfu


4.a..8

fr srqm cerPrrrqil {tr{

<l eFtfq-s flR'frfi {stscrs Efis qrfr cqHW I FIR*l;t qFT fr


eflcr rfrsmrs cqEw?5Rr-d'T
cefidfemRfuig"o<|qBfib rqts.fin qv<t,.{$RiF dffi erl-<rro
q-ql qqrc{ qrsreTftT TTslE ?oR escq qT I 1K
Documentation Section
rr-yCq-{ eTTSsGilqT

fr

esF mai'0 T-Fff{q

cqH1n.

..{s

Documentation Section: ft fr cqWfcrr{ e<itr


efr6. q(.rl I tqt qqrf cEHmrK EGsffi
r{(r'r<
comment Tt Tg{i qfro r cdEfiq ftflrq et

rortr gfuot rqR r fr stsw qs q]qrq{ {c{[+"

qli
I

// <iqqr{

{ilqs

I 6fT{'-

This is my f irst code in

Definitatiqn Section
Global DJilaration Section

main0 Function Section


{

vT{ qq-tfk.sq]ermswrta
r.l-6q */sr{qlKs-{tqI

Link Section

sTdr

tsK'F

/* e<\
)

c{qq-

/1 This is my first program in C' I have writterl my


comm'ent to clarifY mY Program

*/

Subprogram Section

Link Section: qfr fr cqHfc{-{ eTF qK'ilfr{


qq-t r et qg1 fegfc{ <r<'{s R&A' qf.nn< qqf
qffi-q- c{sla rfltq'cc{q s-fl q-{ I sK fitE
c(r{'lrf{ fixq qcqTfi

User defined functic

nclude< Header-f ile-na me>

Tdfi qf{ ffi, r$'fE cqHfrq printfO


rp-I..*r{ 5<qg. qrE T qqlefcrffifu cq-sl-{ Ftr{
qrHI stctio.h$ firF-{ dBc{rfr{ Tl{11tr'4t q${

$nt-qr{ffi

fr'+lqs

#inclu de<stdio.h>

qft fr ($ql6{.{ ,{TB &&-s, qirt I CEfEfCtr{ q-ql qeflc1.ftT $<qT


,S< {NKq .{Q q(f't ft{I qT I CS:n-

Definitation Section:
constant

fo

#:define

#define pi=3.14;

Gtobal l)ectaration section: ,sfr

fr

CEIEIG{T

,{Tfr ,h&T

q$

qslRs slR{r{ qqr+

Symbolic

cqHTFK

{{s.

qrq{sqr< q{q Eq-o<t pRrs<arro qiq(fi cq{{is<T:s I


^
qTB ETtFfu qq.rf I EFls fr cqpilcTt q6fr-maing
maine Function Section: efr fr (EH15qT
q$i
.lat" effcs r qt s'tR*ftq{ EF qq'f Krg'6{ r {?It-()i csls"il q('t^(Declarative part) s (l) fr{fd
q-sE g'ftT tE?F Tl ffi6s.<-q-C$ Cq1T6fi T-{Cs
(Executable parr) r ffilTcff qqrt ,st T]R{F-{ T.6{r <r{qs
q{ I qK 6dR vqr.i TTerffi' q3sF trtt(lt cll<sro qr r wT qiqffi erFi<' dffi-< c'rrq
q-"i4 qt'f frq1 3qft Tf t } slKf qFrF efffi ': cqfinT.fEa tt) ltTF 4< :n"tvlr{{
qtn r <r++aotft
sutrprogram Secrion: ,ltr fr cqWfcq{-eoft h&-o
s-fi qT I qf{l{cfs mainO
cefdftN--flrs iet et qitt firl1 K r eQ:qq"+lRll{ ma'n$ Tl$tn <KqK
TIR{cq{ C'IIR et{sEF'|(}r{ cff6s, \5r{ e&.ffs mainQrflR*l6ffiCt(tf\e fraff{lS
1

"Y"I!l"i5n
r

**

fr cewfrq
rqsl{tls qs,trrrffi cqFII{
esfr cRq (EHII qI uEil s-ffi

EFdIr{ This is my

fir.sr program

comment rll cent{ F*r.{e qqT


c+tqqfr-s.l<lctlrl r ls{r cEa[qrE cqlElq
gnro qF{T cs Rqm ls<i cERtt Er
TgEi

eqfu

q?116{

<1'

qcd \rt frru

<fu qrqf-

#include

q{ Elift({
s"rqd eEKfr sl$l-d-{

<head er_fi I e_narne>

cqutcq <r<{s

<fir c{frg

cqw< qttrq-< q<nfu <r Fnc


T{t q.Trq r et c{HIcr{ main() 41s{rT
<l{qs Slls-lg ;1RG-<l TR.fd pri nrfl( )

q<

TK 6..iN
cqfrrotqq (;)
fin"o qs r ,4{l'ci'

qK.frfrs

&Iqdqrircft

qLRM-ft{

stdio.h

dffifriftscrr

et printfo
sl$fr{ I' x fi{T
ftRs 6ol-a6qafi

dtcq$sR

cEFtlc{T

6rxq 6qfr6q1qi

(r) Fm Q-{ I .etlfrd main()

XFIFGT dliT*IE

co'lq cw{r

cS?rqfi

cgwrq qfr qr<s mH Tl\*|{


is.r< \Tfcrf fr'q|te Cslq

s-fiqrEI4l

cqst* ntQq

m ain 0 -vR*l{ {t <rfis


fr c$ttqqssa's I {} FlTr{c{J

T.l..l{ prinlfO
<j?fqKs-fiEcscE

qf{t qqfrs

ffi

T-1R"1{

qt

cv-<efi-cqalRqts

<l_Tqr-{ <F-{I

qr{cq

oprn uf rTf{Kqs mainO sli'ir{{ "nn frqt q-s


cqHfm q|E Cs'f{ Fl"\)rll-fi ersfq{ cqR frqT sT?ER

rc-ct< ErTrq]{ q*r

q{R{f cqt r '"frilv

# ) : "t Love Bangtadesh" rqlfiB ficq qq{T sKK q-{r esF fr cqtm frlt

<rr{R-f

cEHIT

qqFf.T,

fr cEHtq efr?6Tf166a 6$.rssmlFtt"ta-<'f

qrqt-

<sLdio_.h>

\nclude
tr\clude<con.r"o.
*"\
I

h>

("r Love Bangladesh");

Pti\

geLch (,,

cdHtlRl;rT-{Kq.l+E
SErgfq flrittrrr.I \et(.<lF cEmmB
Cs\t fr++ (Dev C++;.q +*ittq T-flT
'i'{ TF n-<rq "ll.fGrq-{\ff$ cq.$
sim r tlg?f' C{, Drrft fr,r\Irn. c{ cFF-fr
(i-+qfR.q rqp$q

fr

:{qF{F

ceFtfcr.

cqHF{ efrFc< fi-rr-<

c*ssTqtbftqqq

#includecconi-o . h>

main(

q6t

# 1 " ccn Fmm 's"R sffi6si3 a;r $

'
#include <stdio.h>

C;\C".;orcgr+m\Program-i,er.e

\se

sE]Tq,cqR[ {'.fm

ffi
-

qq{{

J-E

<f{t-{, E-{r

esft fr

cEH1a

fraf

s{t
{i'

\s GFtf6qpf

+qfu

p::intf ( "Misbah ur Rahnan, " ) ;


printf ("Dha.ka College, ");
Printf ("New Market, Dhaka");

getch( ) ;
)

ceffi$tT6qqgTE[T-{
b*arg, cEFfl{E r*nt{

"l

if

:;,:

re;Tt{

"t{ Tm T-{cE Frr-{

qEb$

cqR$

rTr<

C:\{_prog r*m\FroErm,2cx

CEFfIM 6gBK<r{qFT
csfi Rtv:T c$l{ cEletl{ qcst cs]a T-{|T-a 'iF3TI T1T 4I r frflqrc <an <-{| qF C(?rK ffiFlq'4 TEi? f{
Gt'f q(rr{<t 'fl<q'ffrft-qE-$B \oErs.fq C?frs CrfcilE-ss "nrsTf {tr{qIt C$q-{TETro csfiEqr{
T-<T q{fr- rsr< qfr fi-<tsrs <-{I qr c{, c \e I cR{TlE-ciK 6Tlitrp=-E s-s ER(q cq cfi-o. -s< frcs q+q
qrT I q?ffc{ c \9 a 1fr cgfi r fdlTfo ",{" 6fcu-*q-{]-s{'fcs yo%, "fr" cqrs{qqrq-{f 9o7p R
"fr" cqrq{ sni s-{r 8a% rt66 qmfq-{ I qfi fr{Mcs rEt qrEl, Tl{-s r{"lct $s 4{3tr ("rc{'68
c{ Bs{ fr're. "ilKr< {r, m-aql Et-r <qT qsfr +.Ko csF rsrs Bft( mrq I {fr TEI qr R-l{r " q" 6,{e
cel6Tq, w4 c{ <Ffp; qK6E TKo r:I'l6s yo% q{'"{ carcr-R I qrq1E "t{" l{sF rsfi r cEHRs csDf
tq$ c\erf qr ll qmfq-{ q-q'tkr qcry{ sr<Q WEES <l T-qlT-{ ttsrf TK
t

fr cerprnn<r+wrikKaK fiD

rqHlo[ <rsas. Nfiqqq Eose fr&n rnr(?.fc<{ clqr{] fr"ns qT I qt q*q-q rrlcf,?'Kc{ FrXfrFtv rF
i
Fret slrt T-fl {]T I sRfi) r <{ $ qT-fiIfEI (Character set) : Cqfi qfc-lc< qrffi (a-z) <-V qrsr qs" (A-z) 66E ,"tF cltr
q5F3t I bcF{T fr GEFI|CT qtr qtCsT qrr s <g El(gT qFT q$ TS
q(tr"(Digit)
: o calrs b "ltis flF loF qio
a. I
,e r fr6'R fr' <T Tilr<b]<qT{ (Special characters) : !rf{ frrF qr.3"1"
I

a.a..a oubttB4
ANSr cslrl8(D]r) G$fu csbf AS{qqdnq'6s 1q?[5 1 ffift-qa; qRfiT CsDf DfS"f Tf fr+tq csttilt"f (primary, Fundame*al,or Built in)
csEr DR"f (User definr)
r <r++aotft +{o nrwffrio <r tD'et<

Ws

u r ffi,v'csDtDttt (Derived) e
a r tfof <I q*{F csDtrct (Empty data set)

Q.e8

fr cqHfiR

,?

$qfrr

cfrfroqf
6sbf fiE"f <tRA-Q3 @f bR" (primary, Fundamentator Buirt in)
q-o-qfrF*R-qlTq-ar,oe v(ftn) <-gcr{ Gfrfr-si'.f qFxFr$<.f frBtq cvbtbR"rq'qrfqa61qq1) r qIlrsSFI (Character)
\ r t"f rT$n <l tfu{ (lnteger)
e I e$l"$Kwqq{mqtfi'{tE Real)

Tilf<?K (Character)
wB'(escn) rsrs o certrF qcc qdsB{f{fq<t\Tam -lqb ({cs )a.1 "6sfiq{w Etqtis 0 -ei
"iRk{ cssrffi c?I c$rrs-{ esF erq rfl\r$&-s fre qrs I qt rTRrofu-s Fq.orEt< cwrr wvfue'trrnQ q-q qc{qlqt (reF .e <s. ), sfu Tr fu Fq, o c4-rs b ffi q13pag,'fi&{ t61c6 fr6r6 fiq;
Wrs rtfmbl-{ 6stT <qt E-s r qrr{rs char T16T q&fu T-<T qr I cilar cuft qi66.1-s q-{T cqsfr?"s
l <tiF <t u frEqtr'fK qcrts;i
I

t{ tnqn <r ftr\n,K

Inteser)

q'Ts <ntqs 4qlqr t{ cq{first tfrq'K T{t qr I qrm-rs int q'tc{ qfrRs s-fi qr r cqq'fr-cs
qBsflT rT(TT-cq<r w{r a. <fIF qnu RB qF fi qcrrwr
I

5C )8 )e )t

))

)o b

\b c

r\rllK (t-6q )s frb ulsun< {cfr vrt fr-o cqfro qqq )afr frb 1ftts-o - frts-:a; cu?r
<1'ri1;r
firiF G?-:c) qltq fits tcqr< <t{ds q{ I <Tfqo cuBr< qqi {rqq frBtr W
(o) qs q<( 4r.llqs cv?f< s-q]' cR{. frEF .'cr ()) ei r cstK qF q-{rtft tcfr dt frB o <T ) {F
qFffq-r cst|g qsT qlQ{ frb
q-derEt o qcE sl< T|E q{ -Q.tn <[ "in< r c{fiT
"rq rcfr 6stT frrtr{
e\qsb r qKK {.rdfw fil-Wr csfiT qlqq Rts-qq >cfr r$t frct-E q<rtrqT ) q6E \5f{ $-{ q-r Q.5a -5
<l sqqsq r ,ott "l{xstttqf tFmqlr (tnteser) fuqrs -ee.qsh catr$.+s\qsq eK {<j-{q cr 6$.l{ tq
q\?m <r{qK T,?il Tm |
{q{t( signed int DR+i pRArcm Tr{' -\xqqgb CQICS +\r\q\9q "f{g qt
GRs

<T signed

q-{T q<( Ttcffir

sqT\s

rslftrryenm

Sefrft-{ Tt unsigned int fit"t Cstf {Hf{ q,-dr ER <ltrtT q<q(Et 6slt ffi Rrqr{ <I{qs ES
{srl( unsigned int fit4 cefrt-T-{q q 65Fl{ q-ql )sfr frlFs q-<erfi o {ffi irK n.l{ qT o I ql{l{ )gfr
csfi fr6a {<erEI ) qeq \ol{ fl{ E-q \'o - )= gcca\b-} q{}s gc'c\ec I qs-EIR. unsigned int bRpl
Nfrc{-<r-{T I1TRccr{ o 6qlcr ec'csc qK {<f<q m csl{ 'I{qq=m<rq+* qfis'lTl

fu

sdt(.lF q\Bl <t fuq

Rea l)

c$lxc{qrs RflE rstT BR"r ffi qs


<it& q56 q{fr-f s{t(-lTs iT$rm(r{ R sm sTsf
T-rl{K tT{l- (o) Floatfit{ rr (rl) doublebtef
q-"rR""s

s$R-139

Froataq{sst\rlFqR"lTl
fr cqffim frrqE <"f s1R-lq-q coF q({Tf (RT{ \s.8c, -8cs.co, \e8c'.\e
1

W)

finq orq o*sf<

ilt{ <K{t{ s-$ q{ r float csBt btt"i cq{qTfr sq] float frs$6 <I{qE q{ r float ilt"t
ql sa. R? q.F fi q({TGI s'K I qt eq R? {Rtird{ vrq frs cqrs
q(<F-rl{
q-{T a
rgit crrRtE
uF egc"ift-flfi{H frb (Rt-lo ecm "\'jfr lrrqFqT frt G?-o - fiE-ql) os-Ff rRK q-{1,
q<\q<mr-qqrmfiEF
RB-oo) n'lforfrq-< 'fc<-{qcr"l{ osilnrf<q-{t,
Gb-sl) qiqfrbfuc..c<
qiEq\lqr I {llsIf csBKq-diclq{frFFw (o) q{, 4iqtqs e<l reEKqqlqR{frEF,4s (5) qr
qefr rstt fr-6 ,r.sxlo-oo cqlrs .e.8x)o*oo +is <t{t-qr <f <qlq.s R C<F'l+ :{F{-{ rsft rF[ sm r qK
uF egx{rd.{Fl{..fq fr6 o.oooooo ccltrF o.bbbbbb qeft s q.{fr-{ ql{ qtfi6 Tl{ TFII {Ig I qcro
r:nr float EtQ"i qsqlT qqc"ircfiftT|q qrslrg 6ErII qr I ctrFt, eq('ift-flftTn qFFIr< e8c\9,
s.8x)o-oo q<q. e.8x)o+ob 6-s q?fiedr 3.456E3, 3.4E-38 q<( 3.4E+38 cq"rtT{'FT
H-{r float csbt

{i!

"ffi

s{tviF cq?Bt
float blt'f reRmccq< ':no frcle <l s$lvf RR? qiqn (ml-{- \e.8c,

Doubte fiQ'f

fr

-8ce.co,
cqWrq
qr"lsT
.9_r{
q-T,
q-qr
BlQ"f
qesc'.{e ffi) frcr nm F*K
float
doubte btt"t csR(T-<q cqts"if T-fi
doubleE]-{q Fr{C{-{F(<-'tft<f me mft 1 6ou61sffifi csRr{-fi cslsfKq-{f doubleff$iilg<r{qu
qs r EBF doubte bft"f csfi msRcg c({TGf TKI{ q-{r u AE} Tt \e8 m qtT{I:R<sct or{ I qq s8
Rb qmrtm qmr EtT fi-o ceirs qq{ aqF lrf-{F TI firb (fi?-o - Frts-c>) cs?r THK q-qr, "r<-<ff rrF
qqc*frqFfrn frts GE-cq - fib-\ea.) q-{firs R-afflT<< q(r.K 65FI TFil<t s-{I q<( c?r65-m <]'fl"{
frBE G?-.yo) qRr RB R6ryc< qrEqs qr I {qlsJ-s cs?K q-qr wftq 636 W (.) qr ql{ {efrq-{
osFr< q-ff rnqq R?F qr ()) qr I aqfr 6stT fr6 ).qx)o-oob cql[s ).9x)o+eob lifu 4qfqs <I
fitq's $t=fi csfi {FII {H r slg lrfr eg'c"flr+{FmE frct lc ?r.rfr'r qtq +is l.l{ TFfl ${ I float
Ettc"jK:tg- double bttc"f< c({fi\3 egrflrd-{fiTtq ql-$l6{ m<lt qlr
I

Cuff ffq"1 :qlvTl1lq

od if ier)

fflts lnoat; qigT q{r'Fl dfr--o <t qTetfr,o oubt btRr"f< clcrl ql<lK signed, unsigned, short, long ffi
ffirf srd. cs"R qtB Tl "iR'+< lRange) {R 1T(<FC6i{ q_{r CnrR "iRrf"f {M-{ <l FTa TF qcq
(Modifier) TEI q{ t fotr TlT.sF csfi BR"f qG'T'lT|t<T {t{ $r${t tr-$
rq-{.6o csDf }R"f qffi{
qcFTI

t{?iI-

o
r
o
r

short,
long,

unslgned,
signed,

fr catuitfrq

{TqKqE signed r3 unsigned qGplTK char int DR'f cutsK q-ql <( long

s short:t&Tlgla int s
bR"i cgAK q-{I {l{qs q-{', R5l-{ signed qhar, unsigned ehar, signed int, short int, long int
t\5Tlfr r long inr fs qqrvc4 long fr<lms ;rn r qRxwu Tttr qe-flTlT qr-rq\e <KqlE ?Ffi qtr, flEr
double

unsigned long int, signed short int, signed long int

ffi

fr

cerFtlcq rcDK "rr{flTs^ (tdentifier)


sF iEiK (qHIT s-{Fr rrr{ ft{fr(({< slqsrEt T3[rs qrr r$.l{ qt c$1-{ 6sfi< E"r< frft s.c{ I qt
q-q-a pt|qKKqsEn"tBfrqqTxR{Fnm cnrfrcscR<ftsq-{ I cnrRl,{ti[sE ouFt.{r$r eR s
clq.lc{'f clR.r \5f fin- qr r retrqt c<Fr{ c'gHlc:l{ q-dT frfu{ csars Fnq+t o-+cs qm F&..fs' Ec{fffr
(pointer) <Ef rq{Rrs cr|q csiT< qtp@-{ <I c{TR c{6r;ts< I repffiim-{ TF{trqf'i{lcR
qrlG-.4
cT$BT
<r<q< qI s-r< eft6 qxwqro qsF rtq cqv$ R-{ r t qwrs qftilqr <l
qttcsffi:flTtTTqlqr I qRrs{Ert{t-< s{Fs" Kfi c$fregRsw rsc[I

tffir

) I .f{O (Constant)
E I 5-c.fF<t csfiar<q (Variable)
qlffir{{
qTq (EHIT ffi{t{ w'{ ft-{f s I qrhs qFrs-{ci <s. Tt{qlcT{ q-di
{frffi friq ql(q
,{ q{tfc{T "f<-{tr q(r.t 6efr6{-{-{ 4TsrcR ffi
Srn"cl T-$ qcr6q I csfrmsq\s T efst{
r

qqTsfrTT{t< I {-s.{l\ FAm-aq q<l wltcsfrT]aKqF-r-{c6K

.{Ttfu{

STf <t${Sftfi (Gonstant)


qr sT slm Wqo <qf eF r c{'{'{ n { {|{ qcfl 22 r orliRt rct T gr{{ rs.f{
slT ml-{ {ffi
7
qer {I I (qtEfN asn TIFK s|{ {ffi
q(E slrs ,h cEIEI(qT.S<s rET qs I gco {$llt
4f
"fffi
offm
A.a,.g

?T

tKK{aFf

rwnoqxr (EHfc{ con csfrr<-Ecq-s.ssFfrffiqr{Trc"qg


qg'r cq cw-cq fr cEWlfl ,h qFrs .3'{-s <I slffi RrqK m{"il T-<l qr I ceRRT.{rs.T rE
TqSfirD-<, Tl':{ cffrs q<\ frfi?3' frqTf rffis osD't fRq fr($ pM sr{
<|TTRKA|<T{ cs'l{

qcro

csHr({ g<?F <i-+qr<< qRn-

o
.
o

s{:F{t<cKT3',m qFrc csrqa v-q q{'lK qsKil'I


(qHf(q-< ColsDtR"f q{rss.'s-S olql-C{

oF'{K

{qsTtr{I{] q{
fr 6qHftq q-<-qs c+.f{ csilro .g<o foqrE ffits.||{ q-ql\ot{ cs?f Aer"K {Fd const frfld <j-{qf{
s-$ I qR-4 c${cy{ q4r q-4-Sffi_..c( q|<Bs {].{ q<( 61T{ CqfrcT]q-{. fi.-{I ql{.l-r r rsm cst,r
ErFlI tTI qn-+rq r':DfliFK o-lro inr bR"i ftcc< {r* 6l{ I rq:Fc4lof]B.

Atf

const int Max = 50;

qRK

<K{t{ s"r{s cs.f{ qwco r-d#fr$ Rcqr{


E<( c"tcr c{frmrqqftr\oRfl;rf r emGnqrqfrc"sqs

#defin" Prc4rryrr<

dtDtt{

$q-qs{:

#define
Max
50
#define
TRUE 7
#define
FALSE. 0
#define
Pl
3.1.41,592
"Computer
#define Dept
Science"
Q.sq

cqlT"il s-$

{t$ I ,4*'ef csI{I"iK w{i

s?B"s

CqFlt.cqFt

E{b

A.a,.q 5qs' <I OsRif$ffi ffariable)


if]ntftE <r<ql'r<K q-qi nrF.tco etqnq s{q-fim qq<s6i s'{'l Rt r{R ers'fs'c{ cq{fr csrrs st B-relqa ti$.
qll I f?r5;,stfr{ \FFrit} r*qlqrs evfi <f.nr qry S-{Hfr frb, qRE qeq FrxTk d}fligrt .{isq|{

?FTiq eflrii4

ssl qT, {1"<v' <v cqFl{:xla q-.]T -qsi-g qFq e<i l#+< r <.T{t qqF 5F qllQ'c}r{ E"[{i sq{ cstq
@"crT rst{ 6sil <lRtt qrET vT {6{ TFtt qls< r et qqF$ q-< s-{lil q-{r <l. (qHT:rrs rrqsr F-ff{
E"rsj sm srr< srsm-ffi, TtF cq'Tfu erqrq'{ "rfu uq-f qr o*nq-+s <rEqr ircr qr
Eq-$ $ 6sRc'q<s wfl cqFnrrf{ qfq om frn ffi q| T|qb qq{FrfT q-{]' cqqR {Rqr<K erF T|c, 6rT'
qfrErqqftn ngft{ffiqs I Lq 6sm cqHIqK<t cEtEtI{q<qtcotft-EqTff{ q-{-sK cq m, ClqR-{ cs'n
,sitwfr cff{ csft fl"ff w r cs-{E q$-{ fi]i.(T Sqns d'r A?i{s Ecrtq-{ rs FRI{<q Fr{$ Trr
.rirs ryft THI qls sqq erffiq.cR \st )T(Kq'"f orn qscGfts rr+qT sfl sK r E-csqB, efiq csfrc{-{rE m
csFT cr-{ c<t<q .strft $q cqbf TFIT qE<[ r sfrm<rqT t-{t-\rT fl{ rFFffi;rE?T Tf"T st$ Efrq]pF$ qS
\sr.rjtsTc {{f {Fr cr, eqHE:t cq q<F-q TtFt-{ ql{
"tffi q{ \5frs 5.6rs 4f variable E-{t q{
I

my_roil

mark

Et CwRe-{{tq-q cqr{"ff
(ltstfis esfi fim qlw'+<l* qqr qfuF csbm qqT esft csfrrs-<q KrqqtT T.{rs qs r qffi< qftft
(sftt-"rqE oTlrrg lg,i irfE rs$T tfQ"i ftS{ sil-co q{ r cgbl ffi,rq mn mRrg<r-qq i{lxrcf T-{lR

D6rc"

grsfqrir cs{frt'\r :iqgftir q.lT'Flqwq{ q-{r r.,oflqFflK


,smr fiTFil <l il'i{ qlqqm T.(< t qtlfe{ c+t-q csfrcqcq eEls"tl T-g'| qcE 4 esfrrn-{cE< csil tE"i
sl-i{"l'tr c{rf{r\s et-{.-rcTfrrr <r?! <rsm qr r fiB-tq eR(
rsti Frtr"|r csRr[{-<-qcarflffic-s-B
qq'et
qrT
qTftR
s-4tsl< cqfd]q frdtq offi crsRlls f6Tlq-{"qs crxfr
n v"rqft
6efrr*-<r--{K
I
<*dtqi s-r< q<q cEH|q ftflq cftn..-sift,$elm <TmTs c{qR {th Tr< fi-s i (qHlrq r+tq esk'{-<q
cqlT"ftT eK sl(s {r{. cmt qr qq( T(T srfl-q{ q-{clLq eqt ${ qr{{T s-$ qs I e'lrqt, 5-drs <I
cgftcT<E <l-<.{rr(T{ "e{ q-{"ijt g] rErls"tt o{es q-T | .{T"4 cqlTcild F-flIb qc-dtqfuTlt-<F {sRm-{.T

fi]q{t TqI qg

r cuDt <Fl"r<

{mu

Datal'ype Variable I :
= Numberl;

"r*r-,

,rr. Number' ouurtuot"t


f loau Number2,'

il:H:i)

= t2; ,,

qrlfrq'E{c{, erF intBR{ s erF float DR"t csfrrfl-<E crlT"ffT-$w-e q<(


"r[<v16q{qFTfr'f{"f
p-$ qcnq 1 u6< coF 6eR6s<E cqmtK qqs e<tt ctccl \sl< ${
s-<l TK <I qgrq-rfi $inm
cqHFlfr-flrcs cr-rr El{ qlq

{m

frfu

T-{l{K I R'T{-

int Numberl = i0;


float Number2 = 2.5;
cefrca-ErqE

qfiet 6qqqfrs qAllft-s qfin{tq|QqT{ <sT q{ I qt<Ir sfr cEl$rq ft86'otm<

,{trt qrr+{ .cstfts csRm-<-a ellr$ vcr fiBmlro \flqrdslm cqlT6ff< qfu

{lK rC{qqQ.\9b

wr

Ercclrel csfg.ff srT

fr cqlElfu
int Number-1, Number-2, ... '..., Number-n;

qFIT Tssr,qt ,ssQ Drt"i csfrca-<cqT qfr e<t

!f{ qr \5rd \5t[q'"{FF qT'cwl

rqFqt qq( Tl{

frfu

siilffs I 6TT{.
int Number 1 = Number_2 = 27;
\rr< qst qrcq ere.lR-s osRfffi st qst (gft-T<q ,{Tlks <l{ csrfiI TTI Tl{. rT | 6qqqint Number--1 ;
int Number*1; //Multiple Decleration (I11egal)
int Number-1; = Numberl= !23; / /Ifleqal Variable Declaration

ffi

5qQ Tt cgRrfr{ffi{ ffTgjrcolT


csfuT-<-{ c${"it, Ttq"{-{"t L{<(\ol<rdqlr'T{glqTsssrqt$ffi frTqq{ffi"iF-{csq-{
trg"{

fr6X'cnernt

o,-ff 6hr-

1o, 1,2, .,., t), (<(


q,lgKrsl-< (
q{T csFt e"'l"llq T.flr<aK (mr+, !, @, #, $,
_ ) <lrqK F-{t {l-{ I \nl-sK6{-k <rq\5
*,
ql
<l+qK o.fi lfls
r c{:l.{, hsc_com, MyComp ?<q CsfrcT-{a; fu hsc@com r:
%, +, - ffi;

csR[Tr<q

4qs-{fi

My&Comp

qt<q

c+-<Ff

qfqat<tr{ sj@lT

(a, ...,

zj A, ..,, z), &&E

FRfTqq EIF< qCqI 64Iq rffofq|* <| white space cllocs qm qf I C{:F[, MyNumber, Nunrberl,
My_Comp?q{ fsRGT-fi rfu'tvtyNumber, Number 1 r3 My Comp qf44
FR6{-{s qlT fr&? TI q(s fr'm rvp qcs qtm Tl I cs,T{, Numberl Number_I0 ?<q (sRcr-fi;
fu- tNumber 10_Numberqt<g
fr cefEffl <V qrwr q<( RF qrsK qF<sr{I q]-qlTf qd qqq pr< r vtt MyNumber,,Numbeil
Nurnber_lO 4tm' csRcT-<-{ Cqlq$ Or< {?t]@m myNumber, Numberl Number_IO Tlm
<I{qI{ s-fi Tl{;l'l
cclq. ff${trsk qll csRm-qq Rrqr< <KqK T-fi Tls EI, K\ main 6on ff$ilfql qrq\e FRHr<-q
4{ RmK main RFI-{R T-{l {l{ ql r qs.F ff\ern6-q{rq( qln< qT <I qotfi-s s{ <9 qlr"K
qs6q frc"l qtirsfrT'ffi-<T qlq' Rccr{ <lrqlK s-{t {m l sr{ Efret ql RR EET I R':F[, Int, char,
tsq NfrcT<aI t fu- int, private, main M q?s{
Main, MaiN, MAIN ffi
Nfrc{-<q Tp-s-m6t R es6 cR"1-1-<F s1l-T}13 31TqK T-{l {lT I Er< ANSI fiT{ q-{$ft qem
Ffr6l-<rs-{ qln-{ "it?F$i q-{.Bt qelq s5fr silcrblKT {-c(]'qrs qr{ I q q-{r Fk6T-{q q]r-{6cl
e)F trlTm,ilcfi c<ft <K{K qt o-*t oFT
I

fiqwr (Scope)
fr cqHft{ csRca-<e m{6tl{ E{l{ Rr<Dr fiq q1q1<KqBr csE <1 6s.t"| fr{64 | CEEIIT <I T-l\.|cfi
G qcTFFt qrg csfrm<rq< Fld@T frw ws & csfrm-<rm csl'i {t s{rFq {sT q3 r u-srs( sfr:sq
<I ffit'f q<q CsDr Atc'K S'K &fr or< 6gkc{-<sqg6s fr&n qnq qtrqil s-?Tr eI. I srII-

DEFF<I FfoT<rcarfr 6Fdt

qRTn

mrslE (Locar)

Q. r {Fffiqil cSFrlFr (Global)


e I ffio
(Automatic)
8 I GCST{ (Register)
c I ffio (Static)
g I qgDF{ (Extern) ffi
|

Q.eb

.
ql{ls

g'4Ts c{'FflnFf q{fu

<T 6TFFFT

Local

cst{ EE-$'<T csRcs<q sfr crt-{ frffi otq'rr;m &om mmq'r re'$ qS e-r< wt 6s-q c<F-{E & e]$rffi
wc<i frtqKa elrr<F; qffief csrsqqn-.F rElsrE p?Br<-s <Ef qs 1 6qffi{ rirffi{ r'f{sr-sf cq TR*Ir{{
vc<r .i D-q-s 6qta6it r-{T qq qK <rfrr< cffrs ET r qs? qm{-{ co.f{ ffiry uryo fifrn FR'rFi 6sls.tlT-Gr
Tl{{l{ 6-fi slT
r

qr6qfrT<f 6lqH (Global)

sil qs sq sFI
qlFr;
qm.t
csfrGfl-<crcr c$fdE
w fr'gs
ref-ffif
q-sE
qqrl
ellrs
qr9
q-q
r frcm BT|-{*T
(sRcmq <6tT
<T c$Rtq uryro-< nt{mror cEHtc{<t
r
"iffi{
ccrm qFKT rEtsIE q<t. T$KIFI reRm<qq <lT"ffi cqtqt {4rm "nfr
Csl+ D{-o-

inc

m;

main

()

main0 fiR"H R<t qfl' Crl+


mainO rFlgt{ <l & cglqfc{ <rEds {sE rFlR.tr;K

<f csRcsaq

{fr

Tlglm{ 6trq cq{"il

int i;
fioat balance;
""1
i,r,',.iionr tl

rfllTl{ FRm-d{ TEI q-T TI main .{{ qlctf frF'$T Tr csrfiI mt qr-srq refr
q[{lq;r qr qI
6EHf6T{ q-<s-q TRErqt <jT{l{ TTI R.cs "fl]-"T r q{I Tlvfc{ qrs csl{ctl F-{l{ crF
qeKfrCs, csRLT-<*. i K( batance C+. 6{'lsl{ 65R'6S<E <fl q$ I T'l;tcf qlq-{ Tt(Ilf,;K &.c-m Cq{"fi
ffiIq[srq
,q{IC{, FRC{-<-{ m Cf,

fiFFm s @Kr45-EriF<q6qt 'fl!ioI'D"if,


q.l
5-drs qr{
sqOC<F
T.]\'i[ffi lss-{ q.f6qft-{ <T dlTlE pRrr<q
rdlr+t1 NRCT<-{
EFT El-fl"rf T-{t cEptrnt "ffrGE q<R cEFIIrffi cq crr{ cfirs3r
r$<-d{liq BG <t ffi
qs tsrflEfcFi-{frq-q R-llT{ERr{ qR6sir
EFfrffsTm-{<1T{l{T-fi CT[s elfr{
cq'lolE M{rr<-{ *'lq=fr{ EKr.i{.qrs {B qs rr csm TR.Ir{T <Rrn snns f6F'rl{ Tf ffir{qt
o-stafi<lrqIEsilqr
<\ cfit qsil;t rTTs tKRc qTI
qr{ ql
rEfolE eRrraqc flq-r{ s'rq{ qq's I.l{ <l sil{ c{Hfm* fl{trf fi'ftrqfr c:Is qrt m3t
g.Ifq qK<m{
{r{ <T{fCg {IGI4T
qg 3i-aqs eo{
,{T lFti.tlrffi rEfs.fE Fkim-<aTcfiI qtcei \ffir
'{TF rEHlrr{ qrrf rl\fi
cwrsfislE csfu-TT'ffi Ex{ro I
TI(*r+s csfrcq-{EcjK 6qaqq=f ffi
Eqfq<q:
extem
trTfct : auto, static, register {gflFi

ffi<t'

rfl,,,,tr.,

rl

oft

extern long total;


extern int count;

auto int count;

static int x;
register char ch;

qfiT6qfs(Automatib) i"

fi

11

cfim

''

'

asn BQr"f* c{ iFFFT cqrcf{ 6gRLT-{-{ csll.$ sTI qT ccsrEl


cftKqv- s"|qft erfeT q[-s affm I qqq or-R[-T'<rsK q-$ cEHIT fr'dlqsT[E s""iltels orR-c qql
qrT1g1frr qmrn <-sf,E sr{ qr( cqlElq <t Fl\.|{ ftffq clcr q:rqh & eRrs-{csr cFq q&-sTslln,
cEHtm frB-?'T e<R

Q.8o

fr

cqpffirq

"{xrful9l'{ <-trtt*1v crrRr u1xutt qttfr or< f,qr t qs{ ryfir-sRstr ffio
csRBiEE K'fl E3r
q'dftqtrr csRds-<-{ cqN"iK q-ql csfrr-s-<rtr{ rsfifift"K gd auto firesNf <rEqs qs I qm-ei ffiEfis
s-fiItr erEtvoid main ( )

auto int x,

//
t.

y,

zi

i
sm

i'Rrr<
tqT sR

colq rqfslq csfuir<-{ cslT.lfolrE \oK csbf

qn1M

is'r

qdirqF-r Ffu-{-{-{ frinm

fi

auto

fr\srM tre-+ ql s-rrE s*ntqTfr

C{fqrDK (Register)

fr

q{'qH n's r Elt q(F{"rs rq{fr

ceTfim qr<'qg qfqkt.t ceRt.s-<serET cq{fr68

ffi

offittr<a &fitB-cs

q-ET

cefAcilsE\e

q{

.l<sfr 6&LTq
Knrcq !t' ffie*^K (qflTnrrq?{) T[s qRGs
qctsT
ergcs
q<t
qr{Ftts mFt q':w qrnq*{ q{ I ere ryw Effiic<&SIT
crrRm cvft FFIc-s
q{
cG#f{ ("{crrqlr) <Kqt{ T-{t vt{ r c<ffit< 6sc-r-{E cq1qflr q_4l
cefu-T-{ffi{ cufiDttr"R {iregisterftrs$dqmqsqr t qs'f FfdLTqE cslT"[{+-<s]SqrET-

q-{I

register int x,y,z

ffif

(static)

fiqx

\{ffi

e-trlrE q<\. <rrqt-<-stft t]RlT{q TcsI ceHftT con cskm-<n-<


i{'ft.H ilq'<rqqK qst
qr csRmffi{ L{<s. T-lqrleqq s-{r
EcE qro Silfs ftmc{ cqlT$ F-{I q{ 1 &fFr
>rd]-srlft qt qftsfrTm<q (Identifiers) ffilTcff T-ff{ q-dr"ffi$ fr-g;rM <r<q\5 q{ l c{

cfi[TsT

6qfq srn

qr

qrrd

ffis

ffid

frrfir{ T qtQcufrrFnrTT,.c- Rllflq onro r &


qffi+
cqFtl(q
oR(.saqjifi? rd;i s-ti'l{ TFr T-$ q6q qfr<.l-{ T'lqt{ T-6En q{r csArr-q-qsffi,r
Q1KB-o fi{ tlQ\o qs r fu ffio csfrca<e ffi? rorq el\.lt q+]ftro-<la s-{ s-fi qrn m<Fr Eqn-{'t<
CEIEIT

cc?

6Bt(.<ur

ffin

ffirl-a6as sr{i cqr ExB-o rtq tlq\o qr r q-fiqnt s\r?ff{ st TE o-fl qs ffis csfox-+rrTT
qlr Tlvlr+ cqrT 41TG-s rt{ lRs rT E6s $<q +l\*fq nrq rqFffo qft'tq !ilT
qr I c-$n
"IQs
csGrl-{drm ffir Rffir< csls.flT srT csfrLT-{r"rg refi brRrq< {6{ static 6}BTr"M qm{s q-r I crqEstatic int x;
Srttrr R6rrE ffirfrs c+tE csfrm-<q cflirFr eq&-{, vc<
m r qdn co1q
qstT-RrE<f4q
NRTTr<-qr.6q-qq
cq csF Flp.{fi'<I{qK4-{t{l3r r eqHrq qqTs&drttl:Eqtrq
cfteT {FlRrlr{ <r+{< o-<t {l-T Tl

effi"

ffi{

egDf{

(Extern)

esfdlt

6r-Rc{<E

{Rq6{ clt

eo fr-fi{

Ttrr r csf<lE RrrT{E

qTFr-T

c$t{t{

(sR6n-<-{

ffi,qs c+n re;frc-q<qr+

n lGUrp stro ert

csBt BR"rcq

{K {l*

r$tf wat{ qr qBs-e ffiI


cs vtRt{ $ {GB-{ cctro {k{dqo;il qr{',

eebn'ta

qeFT

cstscir T-ff qg

R?qrr
t cot{ reRrn<dTrs
"1TT
egEf.{H RrnrE m$T{ qqr sr{ afr fiir"rq {r{ extern fre$6 <r+qs qr t cs:r{-

xtern int x;
cflFlq NRrR-<q e<( qRE6m csfrL-T-q(s-{ TKrn?fu qrqf et cq, csFrrq csfrm-<rqa $rT 'imf
cEHtfr q<E affrs, fu e$rflE csfrc-r<rqr rF cEHtrlr fr&n qvn st {G&E fi&g p.n
r

e.8

sc|-f \3 Csltffc{ttt'ETe

Dqloqlfficr{L-{{q{XqNDfbq"tlff

l-{

fr cewc[ fi-cTftsk TF8T T csRt's-{rffi {14 E{i T-flT q-{r scanf( ) fi$l;t <Frqs qs I qI{l3t print( )
T-li-lq <r<qR cofq csRcs-{cry{ q,fq {ffiT{ qq.f{ T3T q.{ t scanf( ) <\ printf( ) F'tq'14 <K{lrf,{
e-flitr qrqrscanf ( " *F-S", &VariableNar0e) ;
printf ( " tF-S", VariableName)
,{"ill-{ F S CS T-<{tF r',qfrs'RlT <El q-T, q<\ vari;bleName 6{ csl{ t{{ csfrc{-{rET TlT q<( &-rf
qiwc G"fl66Br <6il qr qf 1 irc{ corq ffi"r reRcq-{ro-{ q-{r ,$rE'{ q{rrrtr{ efiilqr I scanf( )
4R print0 Ew +t\.fq< q-{I qre T-$rF c'qfr's-RlK <I{qs qr I
qs.RT{ el.S frcr efm-{ cll;frP=-q ffi{ T-fi{ q-{l' $F
<iTqlR"S cepilq #s , fi-r<tc6{ TF{rm nF

cgWmfr{

WIFTl;t

#include <stdio.h>
#inc lude<conio . h>

main
{

()

int a,b, sum;


;=i"ti ( i'rrrtet the value of f irst nunrlcer =" ) ;
scanf(""'",aa);
printf{"Enter the value of second number =");
scanf ( "8d", &b)

sum-a+b;

printf("Sum of two numbers = Bd\n",

sum);

getch ( ) ;
)

$,ll'll;

vatue or rirst number = 2o


Enter the value of first number = 25
Sum of two numbers = 45

$fH T-{ffi FIIGIAK Backs lash Consta nt C h a racters)


ft{T orT-$F TnL<blK RNtf (cq:rq, \ ", \n, \t tsifr) printf0 TlSi{ qlfi fftr{lcs-? rrs-q Tltrd?l=r
c-{FR Ea,h T<T q1-g r et fr6|{ Filr<aTsrqlrs <ifsFm s-{ffi TiR-<?lT '<qt qs I TtfsEl{
(

oqffiorrc<?f<ersf <T1-o:I.I 0) Tnr<AKqVIc-dcR Eq'lToltTlTqI I crr{- printf( ) FR-fisKt


esB <rt< rlq 0) Eqft s-{F dtm "Kt( qt qer<1 fr{F rtrssp frrto qr, "Kffi Etil <tlo-5t't 0\)
qqft T-rF Dltffi ffiflT dK q?Fil ffi qr+rm frrs qt, ffi | q-{ffiqslc-{ erF {rlftfsr (%)
qqft o-<Ls DttrE "K"R ntF'flrlfi:tq (%%) frF qr r c.\..s Er$ <lts"Slq oarffi Tnmb'r<erqt<
gI|q-{T sTcaK <KqK $69"r s-{r qcqr-

dfrq

c'.1..s

qr$ET{ffio.tfnblT

\olcq-?tqrEql-?t

{14 (Nuil) Tilr{aK qq{'FKET{I

<irsrT"i 0) Eq{ffi{ q-{]


wcq csRtfi (" ") T.tlr<?lr{ Eq'{r{{sfiI
W6$s (Alarm) qTrdFTSqi
c'fq[{ (<Rn) qsr{ffiIc{Er
I

a.8q

fi

cqwfrq

\f

\flEB"iB fq6-{ qRrq Eq'{rffi q-{r

\n

wIGFS

\r

frffi

qtUE"iE fi"68r ft-ro

g<rg qq.{r+{ qqj'

T-dlbrTtffi

\XN

e*cv ffi{541 q-$


ry{
{B "tR-<qETRrqK q$R rEH <-dqf, ct!?"{iqT q-41,
\51{
**51yE[TS fi{r.fiTq-$
E1A6T

qm{tRr cetHf{ # a : fr6511$11sr.qtficf em{qq*nq*{t qTFfr cetHFfr{

Welcome to
"Higher Secondary
Computer Shikkha"

qfi{l{:
#include <stdio.h>
#inc lude<conio . h>
main
{

printf ( "Welcome to\n" ) ;


printf ( " \ "uigher\tsecondarv\n\r\Computer Shikkha\ "
printf("\a");

"

getch ( ) ;
)

,Sm <I TTEI|S (Constant)


!"K ml{

qffi

"fffi{
qr{

qs Tt Er6s &5<T 4.Et q{ I cs{{ n ar

rl;[

qr41

Rr{rfl .cQ r 4K s.|,r{{ r4.r{

r cQHf6{

csl{ TtFiT qrr

T| q[q v.l[T, .h cEHfn<.fl{s, {EI s$ I .g<-s q(?m

"iffi

$Tlt[<?'l{r{ Csl{ v+ff{qfftqrs 'ifm I qfloq1T cEHfCrI6q-4 sfr5sq6a6 qTfrRffi Tf{<]Tqg:


q-T I 6rr c\lrq fi' cqHl$ ,h Erqro &qs' <l o.lsffi Rrqrs cslT.fi s-dl qr I Ffrr-s?rrq-?T rs
$-+sirr*{s rm {rco,{<( fr+t{ fiR<t ffics?T B'rt{ foT $'tq rrg
L

c{pffigaqs <]-{qrf,{ ditTo .9{o {f{qt{ s-{rq qrq-s csrEt yE +3TlT qEK{T sr:i

o
o

cqHlrn-{ cs]s ER{<F3t-csq'n'{ T'n EIc4


(qpffrt rqq'f{Iitr qT

T]'s

fr c{Hlcq <rEqu col{ ruErt-{ sff Rrqr< 6slT"tK q'{r st{ cuil fiqT"r'{ {r{ const ff.sild <rEA-{
p-Ef r
'"{mt ffiH6llr wql-$TS]T+_,4T EKB$ Tf{ q<( 6.p6q cqfrro|{{ CmT q|<rils I sr{ GtI A?t
Brs"{"tlar$mr'flEst{Ej'cr intfit"f Rmrr {rc c{T lrrrwconst int Max = 50;
gtEK #define P[c{6qaa <rEqK s'Gt rsl;r qFro {ffi ftqc< 6slri{r s-fi {rs I qs't crt{6ff{ q.{r
cufiFRq s<\ c*fcr ffifrrolq-{frF{sq'r r ff-<Fsq1Tft'cg,qr
tqfqd"f s
r

#deflne
#define
#define

Max
TRUE

FALSE

50
1
O

Q.8\9

scf s Cqltiffi{ enfu


3.147592
#define
Pl
#define Dept "Computer Science"

s sl'trF{rqc{T 9i[cfsr-

D6liF

rsfr[.s-<-q qcDq

,{TF

csDt

$q'

slr{{l:ff{ {c{KFrcs 't]-c-{

fr

vFR,

q-$-E

s-f

fi&{

no6,rK

S.-<-s

<l T"E?flf

(qHI[{-Tl{Cg qT

qsF fr-e-s snq

qcDq

sRrraq <mq-(T{ qr'R esF cEHlq fiftq-K qerrs

G-m$K<l cqlsctts-{ceq{

<qfto.<rqBTiTmqsq-s

{.f

cs;RCT'{ECr

Es

Tqffi fr&n <-+rq"E {co "ilc-{ r c{:q-{-qfrqK

Eqt-ct:
Character data'l
Signed whole numbefs
Floating-point numbers

sffi (4qE"1-5 " o; )ea tsilfr), mlfrR.-q1{fr


TEffi lBnr<<"t-:r.c,)c.s W) sq(
Tflr{ABf <rqffi (Eql{{6t-a,% ffi)

char
int

floal

c : Trc< 6E-qrqfi"{ffi{ erF c$qlq fr<t t qelql,


q.Knr <iqr,( t{S fic-{ TEK crsrE fr4cr"{ qqfr c$ttq fr"{r

qiEqlR-r cEFfF #
fr-mtTs-?

{fl{Ft : SII {FF, lFs{


qrql

<mF( qf

rad ius (ESSI

qEq I s'TqfE
$ST 6F{TE = If,ft tq"r-ilq n F \1{

.,t.,

"

qmibl qr{T{

fr cql4r6r< c$'lsErET fif*.

i-

#inc.Iude<stdio. h>
#include<conio.h>
#detane PI J. .L4
main
{

float radius, area;


printf("Enter radius, of the circle : ");
scanf("gf',aradius);
area=PI *radius * radius

printf

"The area of circle is %.2f" , area)

getch ( ) ;
)

Sample Output

'

Enter radius of the circle : 4


The area of circle is 50.24
L.

661-6F-f (roken)

dlcr{ qqcs q.t<I{cF frqs qt qffi

<lrrqs. ssM e<\


{<flr I fr cEFtfcq'{ Re{ dffi
ql
qfrfrtr-glrE
q$s
qfrFE-st3
(To
ftfrn
sl]n q-ltc{ Fcr t
ke n ) {{l En
<t
6trs-{
Titr<?lfiWF
qo"llq{,
cEHfcT{ d?rT.i FB-q"i t'gTffr srsT sr{
dtc<rq csDt qR"f, cutK {tFrFs 4l ffi&-s s]-q
qrq
cq &roq <lTqK Tr< fr cqHlq 6E$ q{ I cNFl ftR {tecT
fiffi W
ErI.FTRT Sm
<trq $T c-{ R 6tcT-{ fr++ 6nqq frfccr {r{qs qr I Sffiq.fr++ e{ fisrr ftq dfr<q slrq
I

\88

fr

cqptftq

<Kqf{ q{s. s.lcq-{ fro ceRF 'rTef<rfls or<r.i fr cqHlcq <rd-qs Ofr+qqws qffi ry-{K"i rr-lcrf srry fl
q-rl t c.e.) 6frrqfr cqffis<r+qe mnnqqTrq<frftXepcq<{lq, <r{q-{ esqtq'rqd"i
crmf q[TTq
dkq c.,r.: ,fr cq.t{fcq<r<as dtr+-q
I

iiilii"i:iii;';

;illLl,*ii.9.

;irii;iliil'ij;i::1ii:,,,1#r.i,,ll

qtffir

(EHIq c+lg cqRfiirq-fl r


csRc{<6l, +J('l{, lont*,

<Fqsfd

Tl{S-{rcl{S-{i
$q'&^f$ c({JT fircT <Ftq s-{'K s-{t

fEi

qssR

fis{t-6

{oTlft
j, k, mainffi

Char, int, float

sm Esfift

I,

:
t

,.I

q@r

qTr

s]'l6{?]K"fqrr" cqHlr{-{ aTq s-{r{

+lvr]rE, qRrufdrrll]R,
ssQrfl

q4fr<B{, q'iKtfs Rlsl


q<(

qgcEfi

"Mkaz.", "Dhanmondi" |rcTtfr

q4-flJTrg;r qc<l 9llefu


c*ri-l"m FE-E

723,4.5,3.1415 ?\9ltfq"t

s'{K q{]

q{fr<B{,

I{rF s.t0q qr{qK $<|f, ts1*{i

<-+q

rllt{lss ig dl'b-o

c-el$ <iffI q-{i

;,i,,gffir

[], i], &,#,rtg'llqt

qr11-K"F

Sum

<t{q\5 '=' q<\ '+' qfR


qeffKt{', vF opt s op2 {rE
qell{tls

A.\.b qtltf<Ffr, qlfCre g 94e1'.1-q (operator,

operand and Expression)

fr stqlT'ilfifrs q<( dktrlq.fiqE"fffikq,{i eserqtfrefi $,tkRtlT crFF[, +,


--, )), )=, ,(= ffifi<<mqoqg r qr{frrKp.Jt[T?Kro<stqTqA&fg
Enqg"p-{'n3a TlT, Average: (Numberl + Number2)/2; qsF qgceFfq I ,g{lc{,

-, *, /, **,

sftqt q'tl<ns osil <l-<+E Tr< Rfu{ T{ {*,ilq-m{ q-{r q"itc<tr{ <1.cq-s qr r W q"ilr<F<ro
6ET{ Rmr< qqct FL< I nserEt q{f{ils, qtfr<tr{ qq\ T-{STktr q|qqqTt{O,rqHT6o qqreffi'

(Expression) <t +$tl FTI qfr r fr cqWrr Errr$E q"tim?* qs <I entR'r q'fiFr]s <|'sq-Srr$
fi-rsfiqom r q"ffcnBcr<r{q-s q4-{rlrs3 q.c?rK&fu-rrq"rn<*<qTqm TEs Eblc4 sTrf s-${llr
cq:n-

).

qq{l<

qeinRT-{ (Unary Operator)

't. <lffiq{k<tr{

(ninary operaror)

QFqR qqrc<b< (Unary operator)


q"ffrrlT <El qs i csTq'
cT liim q"ffrrbil cs<E qTfr' q'ff{j'fs ftm nm Tr{ slrq-TCT
qgceFfn {fr Et <T Ersfi-o TUTIR q"n-mtrs cln-o E{q E{ 6* ffi, srq'eq.fffi{ ,qRfrB"i{ c<riT fi-r
cclcr (s14 Tr qF) e+' qF{ 1 qgrq-i{ efrfrS.Rqf, ,st crm erqffiGF (Associativity) lT
6T{f$ Tql q-q I qfqf{qe tB{fr r+p16fi6qqc{< @T{KT \st-{ (efm rfcr q{ qdn eg-eeFtrffi
,cfrftBfi utq frs c3t-m w-T' qr I c.a..c CRrE Tfl <r{qs o.rl-dF
qtc<tr< ,{qq \otfi-T
<KqK cCg"{r o-fl qcfl-

ffi

ffi

\8C

sqls 6q1afiKFf e{fu


6RuT C.a..c :

tEqlk,\qeffcftr{
+

lqtR \q"m<fi q<(

* u,no*12::+Number

itffi$n)

ul-ffi?l

<I{qK

i!I:l
r4t{ qq1q1lrs3 {q]q-s l'H TiR1e-

umber3=+(N umberl -N umber2);

Number2= -Numberl;

1ffirr?qtql
++

Number3=-(Number'1 +Number2);

lf+;

<r{qu q$
c{.F qeflnfirs{ {t-{lYT TIT {<flcs
qTqv Q-{
qqr{rws flr{-E clrq ) GFf qr I
I

++i;

(ffi6:ffie
q{lr<tr{)

qelf{flrsr q't{ qF ) klTFi qr

t---.'

--t'

q"tl6nt{ (--) coRrr-<rn-< gf <f iIT <JTqK sil qs r Enffitq'<l


qffi<F{ csfter-<rq3 1gi +fom g;frs Rfr-q frtlbrr{ Tql qT I csE-{- ++i q<( -i
{$;
Rqffi|E <f fuffirai q"ffr<d NfrcT.{q T(q{ flr{ q|qrE Elt-s 6a$ft'q cqt6'lT <-{I e<\
6fi"i- i-i-.1- r4<( i-- '{1ifi{ i e15F ;nt BR"t Csk[T r ufitt;E"Ju tbr T( while {C"i tSffitq
ruA.*m *"ir.utu mFr <iqqo qr r tsrffilE '4T( Gfun.tIE'sffir<< Rfr-g '|{<( cails'fug
ffiffi{?T qtr.{seTs{$M FGI, sr{ qrq-{:[l'r{tclqw "ff?fuTqicq

?qfurlr-fu (++)

<f ft'ftd{'+tar

frffin

QqfuffilE$&ffilqq"fffitr{
qffi,

++i

6q,r4fifirq cqtbfi s c'fl$frq cqrb{cqr

g i++ sTTtrtf "ilqfTtft

rii:rtitil'i

w+-ffi

1frt"

r':
l

ffi

ffiomm

c{f$fqq
cqHlc{
c{Rb.icq-{ [qqrq $"efltE]-{ qcFn. csRrs{rE-{ c{l6.rff{ csrE T:c"ntET{ E?rc{
qseK
T-tr{,
<r{qr{
fi{'
$<Bs xln-{ qY6?.1 q?ilcdr tr crt5t <t frcrFI mfrcg{rat{ T{ls-{
'{lrm qkel qRnerr q4 ffitf qt
46tr, p\5r{(, cqFiirm q<E cffr:r$ qt <f6o reftc-<-<m-*
frmuf q6s 1 q{'qEa ${ "i<-{ff qrq ndo-<
{l{"<F-ql-{$-cK
<t

q"nc<?c<<

qTt

ffiat.r+i
*incl

q<GnR<.t-

.rde<sLd L o. h>

?ffinffin4f
*incli:de<s rdio.

*include<conio.

#include<coni o . h>
int main(void)
{

rnE 1,1;
i=9;
i =++i

I -O

and j : *d 8d",i,j);

and j : *d *d",i,j);

Sample OutPut

iandj:10

-i++;
printf("i
qeLcho;

getch ( ) ;
)

10

h>
h>

int i,i;
j

printf("i

Kffiq{6t-

inL main (void)

i++

Sample Output

iandj:10

a,8v

fi cqwfo
<tffiq"nr<br

(Binary

operator)

Ttffi qrmFr ,fr$t qnr nQF qamrrs ftrs Em qra, q{is 31ffi

Et qtr Ea6,
w, sffiTi r.R Etrfl-{ *R+ q(#s *"n*r" frcs frc-T sG'#u
*r*
nQF ocn qeiktls fi6r <tffi qtn-**rq qfr#+qm6T fr{a om r
S*f1F
s"r<
&.rt<
Gfr ors <tffi q{r<tr<cTqrs s
et
q"nmBc_qs

q"fFirs {tco r

v_.toi

6fu

9.q.v '

orrl{tl' I lett-

{rffiqlffi{

r{v.fs76qr<el{,

qIfR?Rffi$

(Arithmeticoperator) :
{i cqHfrq fieq ullRfu vlq R'T{:c{Ft, firrFt, s6t \e sFt W
q"Iffi"<'uqs qg qfifrenqtrs qfir<E*c{cq-K
c*{ffi

Ttr c.no

6Rq-c.q.c : qIRqRxFSq"IknFt

ruSffi+*i!,# ffifffi
Op3:(Opl +Op2)*Op2;

\e

q-qj

Aro

"n

E-fcq-{TFrqlT

Rl1ffi$S"ii:#*$K.$ffi

ft rff;t

eotfw qflRls-frffi

qgcqfi hoRn q-qi'


strin-<Kqq

Op3: Opl/Op2

qjlfteh{fd

t
EF

1GFv.Rvt<F<)

Op3= Opl * Op2

ecf

(rf6Rirofi

FSIKqqr

vtn<F*y
o/

,/o

(ICEreT
v"fn<F*;
+
(rRqfr arq)

Op3= Opl %Op2

vTrlclTlff"rT*q-d]

Op3- Opl + Qp2

Rf{ T-rKnr

Op3: Opl - Op2


(<t146 $erFr)
e{ItrL opl, Op2, Op3 CT colq?Eq csRcK-<q rs.rgql_
4.8

lqcrFt s-{r{q-{T

fiR

sqn

s an'R-slE E1fu

r
.

{I
ftft{-q q"rfr<?Ls'{ (D c+rE Op2 sTre Td] qc\5
q-{i]?
int FRE qTP q'i'e<\1Qfrs $cfB-rlv (Op2)
o&O*f r"fi?5r<-{ (%) cqte -Tqqrilq'iKjl-s
T.il'qfo "iK<;l'i
q"ffifr SFT (+) e<(-<ttflfrrrlt{FT (-) cq"clm{qte:rqqEfl1? fllq (+) 5u:E ftTnfrcT
<m"cq r <.lffi $fq '{<(
ri6 qm\e TM ,.C<( <1q{rf{ ft=o c.f're qfi-{ Tr{t
q-{r .'crF q'ff{rrs
qr!&T{
$tw ''{<(
fu
u.Rfirry1 q1T q-RF qqt{rlrr
",t"ry
<r{qs q-q
fuffAl-{ qefK{BT (Rel atio na I o perator)
eeF O pt-+, <V TT rT${
fr ,EHl* Edt s41-d]tcw :mqr RFn aqq qprd (qtqP,
q"iKfls eqq vlT
qg|l]n?r<r< <W frc-o
'sFF
n*1* q"ffr4!d <iqEE. qlr r Rra"rd'H
q1 qsrqfi q$5. qrr{ qr<r< crft pRrs"+q'qI
"L,l.rlestr q,|Iffts .fim CE{" q{Klrs nsRm<q
frr+
freq*Fm ury;r11e istfrpt e<\
qcs fica I G'a'.s er<F <-qq
qn
o[r<

(l
{|ffi

ry tffi

qffi

ffi)

*i

****

wllfr<lW

<l-{qRErS{T-$qrGTI

Tqt

6RdT-c.q.q
ii'

11f

'

k-q.Ffqq9flrd{

i111;,riJ${ffi!,,r,

itl::

0p1 <10;
Ctnl< (Oo2 - 10)

{Less Than)
(Less or Equal
(Greaier Than)
>=
(Greater or equal)

Op1= 10;
Op1<= (Op2-Op3)

(Equal)
Not

q$tGA
g-t.l Tq.r

sTAffi
u1q

10;

(op2 + Op3);
10;

ir',

''i+.:,,;!il.::+i.1,,.,$
I

q'fl<firg{ (D({ <Tx lv![{J< vl'lrsrlv Lql

Opl >=1 0;
Oo1 >= {+Opz+Op3);

:';ii ; :::i

,aq(?rla ?fr-< q-{'

gf4lq-cslrqflKiT(g{

Oo1> (0p2 + Op3);

ffi

Op1>10;

Op1==
oD1==
Op'l l=
Op1 l=

==

q<(\5tCS"{qr{'-ql{

cDC{

{l:l lh(+{

e{'11{,rs' nY

q"lKjl?sT Crm qlE FrrST q'il{if$t

ftr{{ q"flfltt cqi

slqffiG'ff{lls

{(

l'9

<1

qff{

{F{ fi[$-{ q'l]EJrr;:J:ll{ qrE


n14

fr-F-{ q'iFTi sq-ffit4

(Op2 - OP3)

;il'c'al eT <| Lr14ftq NRril<q


q1llc{, opl, op2, op3, 6{ COrq ?Tq csftLs"<-{ I RFT'lql{ q4fra}I3{
-qr Bmelir
q*Kf ejr-<u1"6{t*o qgc$fi qEcqm fr[ryffiEqqc$fi h5fr s-{t
qqiiKTR
sif$-r;ri fiq qT {l{ "F
. .{<'ft RFT."FrE qgrq,frE Vw.ml El"lt<ils ft'qil iaffi)'nlE
(o) q?m oo ( I ) qls,t qqr ftq <3 TI t
r fr6qrp41E eg-6q"1-4fi {sl (rrue) qrq qK qt"{ qs (r) qr, qfs {trqir (ratrse) {;4 qK ql{ W (0)

qrl
FcE

Rl6T

qeflrnB{$(Ei( @q{tTI <F cqlrc'ut{ frrs

q{tr$T

( Log ical oPe rator)


q"ll
q&-ofq qqRK"f{ ry{E w{ iori;, ,sv (A}lD), et NoD J""f{ T$FT
<Krffi
fr CqHnn frfu*
..crfr
qeqiF{
$
q{ q{( $.* ,4s qIffi Br{tGF{ fu
Ee-$rfq q"fi.u;u <1qqgl qr I E&-sitE
q"m<tr{

E&TflE

tffi{

6fr-+-c.

il

i.v' fu 'fi|{ q"tlc<F<,4<(

lf((Op1= =Op2) I l(OP3= =OP4))

Ffr-otEq-{)
Q.8b

\otq-s <-Kqlii

Elq-flm \{<[ qeiIGfKC{

\el"lJ

fr c$ilfrq
lf((Op1= =Op2) && (Op3; =Op4))

Eerim q{ Eqq Ee-sfiE qs qqrmF{ q6-4p 3yffi q'fl[Tt< !e<( qmR Ew s"lffis int Btet ET
q&-silsqK (ll) q<( Frtn-a1a1 .xrrs (&&) qK q-{r
ffi +-m qfl<its Enrs fu q&*<TjE nB (r) e<
s-q' esF qqKls qrrs r qsiry *Tfq-sim $ 1r; ereF W q"t]c<F<
I

fiE eTISq q"fl{rf{ ( B itwise o perator)


fr cqwnn sRqtfr csEt, qdiqftrtsFRp, frcsRe{srrrrr cfie-sq'rrirr{ RrF[- q]r, qv, qb, qg:
c.*W <Klr qqr fiE\qRq qtfffi{ <rqw. qs'r qfiq wqT
T{ts q{b, flAb -ftqt
RBtgnRs- qb qcET eBqlk q{ft F{, sniwmt
,q"in<?s c.a..b ltfuE frbilRsT
q"tiiqt<qqcqx\flFrct q<q<-fiiql{SrFirs-fi'<Et

ffi

T,

flffi

6frq-c.l. x' lbs$tq q"fimtr< e sftqd 1'K


qt16 v"llotr-ea f<EwEql

lRbsrttu w1
&

wv

EQl6qqlTil-e-{hfir{L<{.c$

(ftbunttur,nv)
.A

q;ff-strc(@

qRtr

(fits\r{Fsr ,49'-E{)

q.{I

Tc$

csTMT ffiis,lT

\ffi

6s[r,lTr cqlvts

({Ils

cs1-tvtr cqr-s^Jr

qeycfl lr;K

(AND) ot"flrE

qT-{r

tr+ae-$

\qqfrrs;rdlrnT qtT

effi

fOn e"'ffiKET

(frbwtlsr cE\f

FFF?)

rslq qelt<jlr-srr
(l{trs*rqq- TRd l'i*-6)
c$I;{

<lffi

fr?qw$.

qeiIflils-{ RBq!.qrs l{{ah5

,ao 4| ,{s.|R-s'<t{

ve rs

(frbr:vt{q.lDl

Brsll, frBs$tsr q"flr<}g

cs-{E

8w qffi@-{ ${ <lffits
ftb; v"nrr"r+

s-{K q{T

intfitr{T 6siTfrrir rtq $-6r r R?evRq qeifc{jtr;K "Fs'-flt$T


sr* q<( qqwJts qttr{ utq fro cqrro ffiMr *ir,r- GF {R

{ffi

q'Eefn sr-<

eiTlh6l|t qflcat-T (Assig nment operator)


fr cqFfirq erF csRrir<e KI qqcq"lrdm {Iq q{i

e)flffi

corq csfr[T{a rl qgr{,i-ff{ Tn Rcqr< fr,fu


r frrD-{ qrs <qE <r+qs qqltdc{-E qfllrlt-{q{r{tr
qqlr<}caE <K{K cc-em-{K q-di firR esB cEHFr

q"nr<F< <r<rqK s-trr q{


T-{K w{r
otfr'O q<\ <r+qm Erm+ rc-st qcT6{ r
6qrTqmfdRe-c.'e.:: : qqF{NB q'[R}{ s slffiR {r{ql?t

e{ffi

nffi
y=x+5;

y T Tl-{ (x + s) {i:<

x+=5,

x T TFt (x + 5) qr<,
a.8b

{t

x= x + 5 qT

q{fr''f

s"r
x-=5;
x/=5;
Y*=x+5;
o/o= x,

o/q=

?>=

x >>= 5'

crFffmHqTfu

x qK"It{ (x - 5) qm, {l x: x - 5 '{a \T{fr"f


x (K fi{ (xl 5) {tK, Tt r x/5 qT q{f,ef
y {K :Il{ (y *(x + s)) qc'{,
v-Gjs) i3 q{mE

Sf:

{{fl{

x T

{I{

(y%x) {tr{, <Iv:yV"n9a_qTs"L


(xt>5) q6{, Tf x= x>>5T \{'{fr"f

sF5{Tlq qnf$-T (cond ition a I o perato r)


fr citWn -ft# qfc"rcq' c+fi csfrnr-fi <f ,sq(q{rl-{ nt{ q{t cvtRr6{-<-{ <t qgr{{r{{ {lq
fr'ft<"f s.-flTtsl-{rs&.|{|{q"il-r<tr{ (?') <I{qgqr lF&-rr{r4q"fIrntr{<iT{LT{q<n]trqcEf-

RccG{

Expl ? Exp2:ExP3
rFlqlfrs
S"frff dffi qclm Expl q-otlfrg. qr<, q\ocel{ ,4q :ff{ -Fi'rTI qrq qft qsf qcE Exp2
qf{ ,{q nt{.T{r rt fretit <q Exp3 {"{tfrs qr q<(
ET q<\ qg'(E irffi flT 6{1T{ fr(Rs qs I
qel{l Exp3
,qg-cq.{rffi n.l.r{ s("f fr,fiRs q-{ I Brs{t, qffi $&}Ffq qafll3Br{{ (s'm c$-<6I Exp2
q*,fffrv- qs; Eip2 F<< Exp3 Bes q-,fffts qrql I frru effi erF c$Etr cqrt {6Ef<j-{qfi.s cEHlq # 1 3 fu{F<lq-{il,i-q cq\s$ eft?FrqEl rslrrfrW {t{Ktrrfr-*ststEllfffiqT
qrF cqw{f,ry{ |
q'qt{Ft: frXq'ft{T3IKq-{r ()) csFr<lqTtqrfi o {Ge ell3l-trtTl t (al lrl lc) r=01 3\ (q) R mFr
..16:
q3 ?t* CqtrlliE q"l{ <1q CcltrF <g {C\9- Ec< [ (a+b1>c && (b+c)>a && (c+a)>b)l I et qfr
qftTtsmfuWqc{fi-.+stfrfrrr< cqHmfuo cqTf qrql
I

#include<stdio.h>
#include<conio

h>

rnai-n ( )
T

floac a, b, c;

printf1'side1=");
scanf("Bf",aal;
print.fl"Side2=");
scanf ( "8f", &b) i
pr:int.f{"Side3=");
scanf("tf",&c);
((allb]lc)!=0

&& (aib)>c 6s (b+r:)>a && (c+a)>b)? print-f("Triangle"):

printf("NOT a Tri'angle")i

setch ) ;
(

F:n qtffG3tr{ (Gomma operator)


I qgi|r{ <r{qs,
fr cqp1-6r q6q cafi tsttc"f< fren mftc-s-qEm TrT T-{lK E1-{'s{T <r{qK s-rt qsqttl-{
<ttrcs\3 TqT
ql{K s{-ffO {ir{ frfu{ eg(Errd-{:[c$ wFi-{
T{tr,<F. (,) s{t q"l^R-<}{ <arr qs I
q"m-3f{ <1.+qs qfl

Ef-c.e ' TTlq"fffir{{<r{qf-{

int x= 5', y= 6; z- 7
int i; j
forg= 10; i= 1; i<= j; i++;

int xa 5; int y= 6', int z= 7


int i; int j= 10;
for (i=

i<=

j;

i++)
Q.Co

fr cqwfr(

ft

pu

nctuator)
cqHIT cE{K qr-rr RGW dn-or;rE
(

"lTs'{cRtT

(rwa-6o*, re-+ffi, csftm-cq, qoitr<}g,

q"ll1;p

t"iffri
q:rsr cl{E <tqco frs<f cqHfcr{ ffi qMcs oserfi
"ncF$i ffii il
stffit{ <r fr-<tq Fe
(6{T{ 6*"m, TqI, cqfircstqr, colctsfi ffi) <r+qu qr r qqrqtr$.
"treFTBr rqT qr
.'fl'+'fmtrserE

w$

qr qoK ctrr<rE

c'q'f,tm

"1.

firq (Special

Symbot)

fr c+*m frrlT ftq stf c='ilm (am- fiiTNt, +ffi, csR-c-{-{q, qoffrdFg, qqkrM
1]Fl ql <Ic[) ft"t<'f {:r-{T ql.r{ orrr{ q-{i +-wrrrr frriT 6q $'$]n-{BK (cvw .,,
g,

ffi)

<I{qs'qg I qerqlr<F 5'"o1"n-a fiqq

qtf<Bf<-<

TEI Es r c*"t"rt-q frq-qem.Ne

qa

tsirtfr< :rc$

@),

#, s, yo, n,

q-<rK drro6.

Wt5tc11i51 ( p reced en ce)

r$lq qg-c$"ltr qA rf stof<rs RE-{fR fus| TR{tfr qtr<tr< etf$rE ES rb s., c+fq qqtr<tc<-s
e.fq.
Wrtl qr{ qK Cst{ qqfmBt-s-{ srq EK qr< q<q
q&.ft$.14 cofq fro cqfco (vtr <T qtq)
!erq";5{{
aF qr{ I qeflIRftq{c{{ Tt&T{ qqfHIsT ,.{<\ efrftU.pcq-{
G:rrs s?||q.-.c{ WfqrEif (precedence)
,aqq !q.-'T$fr| <FrI q{ r frftn q"rn<trq qE FBsl qqq
@,r{r$ frBn <-oq r xT{Kqv RuqR
q"il(n?RcTq{ qE4crJET c{ft q<( G':q{lTt w{
cctm <rcq qdts qqcE ttrl-{ ,4&ftblT E]T frs cel,(s
qp {m qryrTc{ <Fr frrs qrc 6,i{ qs r firfl
qEtr<ilss r"Ffuq
{lTr{fRsskE frltn erors
<.fqto-*rqrq

T|ffi

6Re-c.q.:t
aB!.lR

e<iq1mq1}6<t<qTrq{qE{qrq
+, -, ++, --,

en-<qimtro G"rlr-<E{

o,

q"inrtrs

(, (=,

EMTtrqqqtr<tr*

sf!5-.Rm

qffi

q"rn<b<

q"iffiF{

l{BT]tsq"ft<D-{

/, *,

o/",

'fiftGre.

@{{r$

sl-{. cerrs<fffi

+, -

TN Cclcf STm

,, >=, = =- l=

TIT C-IC$.\5Ir{

ll,

qlq 6clrsl'lr{

&&

\rr{

cRrrs

*=,l= o/o=, t)=,


=, *=, -=, l=,
))=. $=. A=

:t-{

cefrsqfN

2.

TIT

{q.(errs v'ni{

silq c{rs<fcq

qgcE"irffi fr qqm qqref"r{ fr66

<N Cqrcg-Ir{
Tlq cercssfcT

6q-ay

qqy

BFF

arfr

l,&

srf qflcal-{
ic++ qK fr'q-r qtlc<F<
EnR<"t , fifrs

\e

i=1ju

qrmtr<

qclfuIl-i

fr-

s?f s Cfl5ffF.He{fu
A*x*x+B*x+C

Ax2+Bx+C

@c

sq rt( S.(

S-A)-( S- B). ( S-C ) )

pow( (4.y/x+8.x/Y),x/Y)

+v 8x),
lr+__y)
\x
(

'/

or^unrt{\
A.e..b TI\3TN5 (Keyword)
fr ststr <rTq\5 fr&-* ftrgxtd cqn-q
cqHtrmr qqi qKRs *.K.t.* fte-!16T{t E{ I tcsl{({lt
{K qeft ..csfr fiffi q*f qt{ Tr< q<\ cEWrF{ qsF Rffi
inr, char, iloar tsfift Eta;- *
"** q*k tTK"'l c*qqTt{ {t\3 E,' qr{ q<\ *'*i?sf{ {"<f{ 6s;{
&;{qr rees au*6orn qtft,t
'
'
c4p{1q"sqt{.srrs"r{.ft{"fts?qqTfiffiros?sfrqsr
t

6kE c':\.s , fr cEHlcq<r{qsftrsrrd

ffitr

qrr {6ffi fuq qt* r qK iTNFr u,e*{ qffi cqg6^u-q ft." 'nrs
qfr e{( fr++ e s'eF ff\eTl6 qrq
EGfr <{ *f or.tu qg I ANSI fr co I

<i<ErKK

fi"-t6"ia.

Qq16 g q1$np 6rsffi (lnput and output Statement;


fr{F E{ st sT'lTf
fr cqwlT vlrtr t{$ e qrEtol? 6fiffi q-l{F 'IC"{ e8 sFlTI ffg|r{ dtflB
q*.M' r di?q'rry{ *"'* slanr0, printrg ftrtfr rlvl{ <Kqlr om q-qrqt t{lF \flBb"i?
GfilrqtFrffTm r "r<-+ffqtcrqTT cfifutFr<nrrf;qE<ffisqcscq I

C.\.)o

CefHfr\<fSf Tt CqFtt{ Gfib[{t

(statement)

qKK S-ssffif &lr<t{, fisfld,


SqCE'ir{{ crmc{ t6io r q&F qgrE"r{
qr
qrEwftfiTK, q{lr<}*, qelKlts isrtfr{ c'qq6[ ut$\5 r es"f eg.cqtFq$r{ 6ffi Tfi

fr cqH|T Swlffi
c{"'{T-

int

x, Y, zi
a.ca.

fr

cEprrfil

x= Y +zi

fr swm <r{-q"s dftq-iq:ieFF E<lq RF qrf eFi $-{t qr I c{.ffi_


). qsq c{lWfrl<f{r$fr-"Jq dftsb (Simple Statement)
e.. cfrfuo^ cgWfi\ Tro,'qT T-ollErs dffi (Compound Sratement)
ltffE cqWfr(ilTf qtfrs'lq' f,*?ffi+ (Simple Statement)
6lrq{, fi$TM, qtlsffifi${, qel.l.c<?i[, qeif{tls ffiT;r.*
qgcE F-cs {<q
"tFs ron:r<.E
<f fuE 6fffi TET q$ r frqe rrBft{fc{q !fi$T.Fo 6qfrcsTq-{ (;) sKf fis
Es I c{:Frx= ], +z;
gerch{ ) ;
cfrft+. reffilfr( {lW <I sqpftEscom pou n d State m e nt)
q{F qofR-r fr."qE dffi freT <-{frT ,{ mv 6ERIT qr, s"R \oTrs.T'tlts
}'
6fiffi Tfi qr
qsF F-"ifBg. dffi rqRr{ qeR csf{ Tr*ttEs 6fffi {LTjt"<E-r6q
s"oIIB\r
i
dffig qql
"ffcr
m&s. fiqT <sft< c*ilri .sff flfrrs'ro{ (;) e6r" qr.qI I crr{-

c*ffi

{
-116^-

r/\.

pri.nLf("ThLs is a Compound Statement");


printf i,\n Thanks. . " ) ;

i
qslD sYitBs

./
q{rrc.N

q-6-q

6fffi

dffi

<I{qRs cqWT # b

fr{

\flr :rqrcef
q'rilfrs qr

: fr-ErsT{

csf{ or&t-{ dftT'B rflil <tvprq q| qeE aF c{trF c{T +fu


I

gfr e Bmrof* T|{ rq\ejfi en-$r6T sf{

6TEf+q fr{6{-{ q-{T

qtrE

cEH.lT

E{Kl{^: ftrv-cqx (s-qrq EreI Vfr $suf{ Tlc-fi


({tEn{F cqRT EF'-

q6pprE{

q6fu

qft

t(pfr x

EDFs-t)Al I

fuT

#include<stdio . h>
#include<conio . h>
main
{

fl oat a, b, c;
printf("Enter the base of the triangle : ");
scanf("8f",&a) i
printf ("Enter the height of t.he triangle : ,,) ;
scanf("tf",ab);
c=la*bl /2i
printf ( "Area of the t.riangle is t.2f \n,, , c) ;

secch ( ) ;

l
q? c$utlcF rr{ T-c( frcu I\5

tq$

fr6a q-aq-{ oilrKt sl6{

Enter the base of the triangle : 23


Enter the height of the triangle : 12
Area of the triangle is 138.00

<I{qlRr qqwq # a a ccfrGi-s s:tql.,lErq

rlrd{{l$ E-pl{IqlT

ica

s,flsiT s-ff< si*{] eFF cEw{FFI

rsef

q,{ffi{ e m6ers s e-t6{-q?!

ro1a6gr{

5qffiWist"mqf EF9F Cqs$qr{


#incfude<stdio ' h>

E{fu

mFfRsFf

q-"t-6

=' :t'
959

sldT er<fl-"t F-{I

q{ t e?iln

"n-*uo

| CEFff[T{ CslsslEf fu,F cq$TIEcEt-

#i nclude<conic'.h>
main ( )
{

ll?liti;l;rer

rhe value of centigrade:");

scanf(-tf",&C);
t=9*g1U*=,,

printf

"ttre value of Farenheight is t ' 2f\n"

get.ch ( ) ;
)

'

F)

cqrQt{Frr{s-c{frcPqsq{"ltfrmvq+e eJtrlqtrr I

Enter The value of centigrade : 40


The vaiue of Farenheight is 104.00

G.a..)b S6frlq

FEffi

(control statement)

frcEH|c{-{dffic{qqT<]<qEqft6t{'{{qfr{glr{qqfift-sq{.|gr<frfrRg"iRRcxg

r
.
r
I
dffi

dffin

cIflcs] fi,flq fiR-fi s'r{ I rlqtqcsfsi-{qcE


6ot{ dBrq.fiEt<lstslk-s-{Kq' flIiaffi
qd qlcoks <T q-{]' 6q4 Sftxrta sElT.ffi{ etr65 cof* dffi c""l]qF{-{ smlq-{ qrE
qs$acq Fr<fr<Fnto qcq
cEHRffifiT-q"f qffiLT{ E6rlsi{'ErE
.q3' dfficereq-$ dffi

cq1E1{K Tr'&1q

fiTEq $5 q,qq Er cEHIq

E\5r

r{qq {.a-< qs I fr cEWrIK 15rfilE

csffiqxro

cfi{- ). T&rmEre-cfrH dffi (Conditional Control Statement)


\. q4Tr$E CsirTt (Loop Control Statements)

ntglcffsfrts-stslT

TfurFlq Ff&l-E dffi

Conditional

C on

tro

Eql4
:

I Statement)

<l-{d-s q{ I $@FitE Tt-AcE


fr cqHR;q.fdqfr"fm con dftqB qqtqrdK s-{r Tfu{6rl{ FC-$E
q'{i ffi14< Sq 'fl\eTf sl'g
q6E
q<F {{rqK SFr 4I\3Tt Tl{ \Tl{ fr?fi
<,q-qe q6 qsT qcE cqHfrT
q-{s{ Tfu'l{lE T.6fiq dffitqq qm-rI

)tifdffi

Q,I if...else dffi

dffi
8 I switch dffi

\e

if

else

it

dtwt

fr cewc{ '{fr" qc{ i1 6fiffi 1-{W qT I cqHk{ 1$ qEams cOq dffi


dffi<rEqsq* r if c$ffi<r<qqirq{$trqcqfif (condition)

tc8

'r',llqrd?r

q-{r if

fr

cqwfrq

Block

I;

Block2;

if 6srcnrt Rr"iq's.16 (condition) {q.l<q\o qr <f qF[fto Ee-s-Irq <T Rr-{.f{lE qgcEfi qr {I if
qqT ffifi-{ TrEt cE{t qr r if (condition) dBrq[fa et-rl cslq cqfr[otq{ effom
Tl I ..ct.ffi
'K-<q
{t{ {fr Tsl'ET s6it Blockl ,{ <fu Sl-siem q-ilft-s qrd I rElqnffir fiT-c"f Block2 rs. {Ir{ dI
T-FI Block2 cs <ffio rMqrFrf {*fiFis rf q[T "f{Tq dfrntc{q q-'fifrs qr I Blockl 6{ csf{
?sq futq <l TFflts d?cr+ qcg qtr{ I c.a..8. ) frq if dffi<
ef{RfiE cmt EcFitI

fiq-c.\.s.l s if crtbrrctr{

ef<fqfrn

<ir{R-{ cqFffrr # }} , 6Epa aftqa {r{T cfiR {s.{ q[R 8o r c$l{ Fr,flfr {fr {fts]T 8o KI islir
6Dr{, c{ft q{{ q-6{ T-K Er< tf f w{ietK Rq Rcrc{ 4qT s-{t q6E I fiffifts EIffis fiTrf Q{t?
Rcryc{ <F-qtr gc-< wEb$ fuqrs gs piqft elt.I <f (FFE[ frqlg qnr.K s-{' esB fr cqwq
'w[qFI:
#incl-ude <stdio. h>
#include<conio -h>
main ( )
{

int mark;
printf ("Please ent,er your mark: " ) ;
scanf ( "*d", &mark);
if (mark>= 40)
printf ("You have .passed in bhe subject.\n");
if (mark< 0)
princf ("You have failed in the subject.\n,');
getch ( ) ;

(qwI{E

Tl;I s'r{ ETs r{TI {:FrFrEPlease enter your mark : 85


You have passed in the subject

a.cc

CEffi

if...else

nf ir
<6IT q{ r if...

GfiDcq"{,=

else

tr"lt

c6ffi<

dffi

\3 6$n*fr{H

qlcel else

<i<qn<-<

el1fu

dfurb

<rqqs qr 'qq-{f q dDrr$r<F if... else


r

+=nrF Emt-

if (Condition)
i
Blockl
l
eise
"'.p

Block2 i

Block3;

q{ sf if
(conoition) n66qo *T u1 qrtg.s qft-anq <f Rcq'rfiE *scE'1o
<cq xt
r 't61 eqm <qR'{ {r{r f,q"ll qs I if (Condition) dft{q8r Tr tsf clFrottrq
]
\[K {fr fiRBT q* rr[{r4 Block2 '4 <ffE.
qql
q
T.MerEf
qfr
\56q
<Ffu
?r\eT
qir
Blockl
${
dBrl.Bqce eflcit I c's'a.
-w,{qc-q1fr9{s r Btockl e Block2 cq cs'F ?TqfiqqTf TqEs
q<5fr if"'else cfiffi'e -nqry ltm I qm"t Ts]-<q if"'else
eFfr jf...*r.e cttnr&
ctsffi <q't q{ I c.a.'8.a. GcE if'..else c#tlnr$< eKRGq ffi'<if{ qrqT-

;;;;fu*

<,u-qs

{d

$ {6{

"qnt

i* t*

dffirre ffr*g if.".else

t-Blgr]
ft-6-c.a,.8.a.

q],-{qlRs cqHT{

{TKf{

# lq : rdq c(?m &rl9

q'f

if...else

dtnrBr er<rsGql , .

Rrqlg vf R"fu

s,-{l3r

q"{T

qsF fr "cEtEN fr{t

*include<stdio . h>
#include<conio ' h>
main

inL a;
printf ("fnsert a nu'nt'er=");
scarif ( " 8d" , &a) ;
if (aB2I=0) printf("The number is odd\n");
else printf ( "The number is even\n" ) ;
getch ( ) ;

l
ceHf{F rr4

TCT EIS qTq'f S-{FF-df-

lnsertanumber=67
The.number is odd.

else

if

GSffi

qfif}s.tv fldt crl1


ara* {T I else i, ffi

dtrrt

s-{r fr,cEpilrq "qq1Qlt-{Ufr" *d jl..else 6fi?5q-rf,{ {t[?l else ir


if else cfiffi< if R else CfiBnnA< {lf,{I {cT I else if dtn-B
a.cg

else

frcerwfu.
qR. if qT qfc$ sfrf
EtT qfro r cetFtfc{ qo|fitn: ir.cEfiir$ WIc<;r frEg trqm erse if
q{EK r q-efr\ cqptfrr e<{R-s q6 {FR qtm qqr ehe if rr{qe
{$ r erse if 6fffi ;4,*

qffiF

if (conditional-)
i

\-

81ock1;
)

"?l

else if

(Conditional2)

B1ock2;
)

else if

(Conditional3)

B1ock3 i
)
ir.

else

{'

oefaulLBlock;
'7

BlockN;
c.Q.8.8

fie sbs if d&rna

eKfq8q

6q4trq,qtrag.

frq-4.a..e.s s elseif ofiFcreDreRRfiq

e,c1

ffi
;-*F

selt
RI-{qlRs cetFtf{#

ffii;

C{FIIr{Ff

E{&

e<tBfr cep664
)E, TsFrq\"Itt filqriFo ffiqs{fwqffiornq-qr

'

#include<stdio . h>
*inctuae.conio . tr>
main

()

inL a;
printf("Insert

a number :')

scanf ( "Bd" , &a)

( "The number is positive ' \n" ) ;


number is negative'\n");
printf("The
if(a<0)
else
);
(
zero'
\n"
else Printf "It is

ii-'i"to i-pt:-tttr
getch ( ) ;

CEFTFFTI{<'r{

glg{{ilFql$q-

lnsertanumber:7
The number is Positive.

lnsertanumber:-3
The number is negative.

6sffi

switch
eo:1g-<l 6sffi c?1'sfi6q qry ry"6qeilrcK
fr cqw|F etse if
cSErsB
'BB*otrr*um{."rcsrqdg
r{E' r.ft"\1t";be if dffi<ryc<1gry yntl
e-{i switch c*tcl.6<.*wqs
ellGt
qcs
I else
<jq.w
i switcn

*Cfrt

ffir;cft

case, break

default

6ffiffin

"rr{
qscer'-{xf,r B',,r Bfr^ocl BqT@ qeF3
'*!.*3.
F1*
it dtrxrt ron ofurqn R<t frrry.nm

clT qr

fuswitchcsBdrs'qKKqe."ntuo"R*t*-:iltqrefrrsBtsdffifr-6ffiffit?irl
switch

dtcrc< TffitF

qcEt-

DataT\Pe lndexVariable
switch (SwitchExp)
t
case Va1ue1;

Block1;
break;
)

case Va1ue2;
t
Bl,ock2 i

break;
)

case Value3
t
elock3;
'break;

i
default

DefaultBlock;
)

/ End of switch

BlocliN

tc'u

fr

.,

cqrEffu.

q{ftr{, switch d?rri,te+-{


trf SqTw. IndexVariable au}t ilt"Frq csFrc$ s r' qg switch
dffirs {1rel efq{ <fift'{ :rmr <l?r{s qsrc$fTrs l}u' .ryrEfi (switchExp) <df qr {Tr qo65*
ffic-<-<ram clr{ q-{ffie- r case 6fFcvrB tirs-g (sRr{<zsK wt{r \I{ ** qff,
l"r. ao*M o
l3rc-g m'Rrs-{ET cwKt rrcr{ TIRI T-{sq erF 69c enro q<\, ,f,{rffif sl<f 6rls eil r case
dffi 6rffi 4$Tq\5: 4Tfr default cfffi enr.f {'ce c$'FI"[ nTI 6.1{ ET r 6+Ff switch dffi
Rq65g cv-kcfl-{FK qIEm Tn-fi sr{r ANSI fi++ frsTr{Tlft c,fifis Q.GSF case <r?rqg, q6g,
{rrs.
sTT CfirE sfr 6s1au1t Cflrrf {|srs o||r{ r Efrtr case trtftsd{
SRrf 6.F ET I v5q qT <KqK
v-snTrBT =l-s r t{rqq efrc-v<r-ers T|6-fi &ftrs. q(ft} case Cfbrrnt< Gftscrtqts
**ffnr qo,
break cfBrsd cEFftT ,frrtK6o switch dbmtqTq qq"fis RT il.r Blockl, Biock2, Block3
ffi 6{ rqrtT ?a{ fiqE <l ffiqr 6ftc{-t qrs enrr r c.q.s.c Frc syni1"5 csanrfs erElqGE
cq{r{rEcTcq-

SwitchExo
=Value2'

Fq.-c.q.s.c

qrit{R"f ceNttq*

)1

rrstTrtFlt

switch

cEffia

include<s tdio . h>


#include<conio. h>
int mai-n (void)

char ch;
printf(nEnter the letter

: ");

ch=gerche ( ) ;
switch (ch)

case
case
case
case

'a' :
'e, :
'i' :
'o' :
case .'u'
case 'y':
printf (' is a vowel\n,,)
3

break;

c{tr{tRrTft\5tsFf vowelT[consonants sTa'FrKa-{I eTfr cEWlTfr{,

qqrqFE

default:

lcb

E?fis GftftiKFf q1&

).

is a consonants");

printf("
get.ch ( ) ;

)
CETHEF

Tl{

TGt qlg qT{T

F-{lq'{-

Enter the letter : a is a vowel


Enter the letter : d is a consonants

g.rE
<T sFrt
<Frqs n3@-g Ffrc{-<-{ iil<l<.c'fi5 int DR"t qs 1
Fr|T 3*lta-_char
BRef
i5rreg
q15E r
C{ 6x.GI case d?flc8 char
6<Fr{ fit6"Fr FRcflffi <1-a{l-<r s-dt trF
E?g.'4 6-E6sr
qTrF
:{qqBlr fr(<|
C<F'tc?r|q <iry TGI, 6{:Fr- sA <f, 'A)
ASC|I {t{

switch

c$ffi

fu

Fa|fr

cgRK-<(6IT

{$t
r1qqlfi-'{ cetFtlT #

qsF{ A' a' B ftR<t b fr{rrdT


lv c eTfr cEET{ ?sR F-{ !T TfuWTr{{ ftrE tsr<q
qE'T (4{I lts sTt

w{r rsFr
6qa qm1fi rqr11 Ec-q"Cq qqtro ErE I {fr A, a, B fuSr u Et91
q{q?r
sFqBtrr<r firn qqfto q6{ A, a, e R<f b In"ll
rI{FtFt I
#include <stdio'h>
*include<conio.h>
int main(void)
t

char ch;
prinEf ("Enter A, a, B or b : ");
qh=getche ( ) ;
(ch)

"rlgqh
case'A':
printf ( " \nYou have written A' " ) ;

break;

case 'a' :
Princf ( " \nYou have written a' " ) ;
break;

case 'B' :
PrinLf ( " \nYou have written B' " ) ;
break;
case'b' :
prinLf ( " \nYou have written b' " ) ;
break;
defaul! :
printf("\nYou have not writLen A, a' B or b'");
]

getchO;

cEFnrF rl;t <tGf qlg rTqf 5-4pp-4-

EnterA,a,Borb:a
You have written a.

lVo

fi

cerpnfin

rI{qtR'f ceNtl5t # lb s qF q(T frFr? corq cq{rrs isnffs fr<nT qqr fr srsl{ .{aF clHI{ fr{ |
qrFfl{g
Tlr colim qs *f's cr cornt eFF c$n fi cslg? TKrc{ tanF osr qcq r c$,8t0 es, eI
?Tl{l{ Tr{ (ln word) ft'dx' qrE I crr{-c fa$ o-*re rql{t"r
{G[ "Five,,r xcltl ev| wqr corq
<rm?il< t{S qrE eT c(qil Ts rrq <le1 frcr r cqpmF frru cqTI qrqf*include <stdio-h>
#includecconio . h>
int main(void)
{

char ch;
printf (.Enter

from 0 to 9: ')

nurnber

ch=getche ( ) ;
switch (ch)
t

case '0' :
printf
break;

( ', \nZero.

') ;

case 'L' :
printf (',\none. ");
break;

case '2' :
print,f ("\nTwo. ");
break;
case '3' :
printf ( " \nThree. ,') ;
break;

ca6e '4' i
printf ( ,,\nFour. ', )
break;
case '5' :
pri-ntf (n\nFive.,');
break;
case '5' :
printf ( ,'\nSix. ,') ;

,.

break;

case '?' :
printf("\nSeven.");
break;
case '8' :
printf("\nEight.',);
break;

case '9' i
printf("\nNine.");
break;

default :
printf('\nYou did not enter number from 0 to 9.');
getch( ) ;

)
CCTTTTqF

Tr{F'r{

qTg

T{

TEFFEI-

Enter number from 0 to 9: 5


Five

\s)

s{rs
qrqtR{
q:rT{H t

cefFtt{ #

to

c{FfiLqFf

qdb

W tf ct"tlm {tn ccrca w qq{flF 6{r Filr

q-q[

qsF 6{Fn{ fr{

#i-nclude<stdio . h>
#include<conio 'h>
main

()

int num1, num2, num3;


-.
pti"tt ( "Enter three integer numbers : ') ;
anum3
)
;
1"""r ( 'i td *d 8d' , &num1, &num2 '
))
'i"
if ( (num1>num2 ) && (num1>num3
nir
-,1 number"'
i
-.--L^y s numl)
ia i= the largest
ptintit
)
else if ( (num2>num1) && (num2>nun3)
i" the largest number"' num2);

pti".iili"'tJ

else

printf("\n

td is the larges! nurnbqr'n'

num3);

getchO;
)
ceNttqF <rq

Fr{ qM {{{t Wrsdr-

Enter three integer number:10 20 30


30 is the largest number.

q{lw{ c$tK t'qt'e (GcD) ft{rsr


<i-{qlR{ cetFttT # r,) s nft

qil erF

cqFW FFt

c${r{8
#includecstdio 'h>

*include<conio -h>

main

()

int a,b,x;
the two inteser numbers : ");
;;i";;i;E,t.t
scanf('8d 8d",&a,&b);
if (a<b)
x=a;

else x=b;
again: if (a*x==O && btx==O)
- L --r tpiintt("The GcD of td and *d is td.'a'b'x)
else
t
x=x- 1;

goto again;
)

getchO;
)
ceNnqF

rF

s.rd ettg q{{I TqlS6T-

Enter the two lnteger numbers : 4 12


The GCD of 4 and 12 is 4

q.cl.a (LCM) fi'{rr* q-qr qqft


<rTqlR{ csFtt{ #qr. e Eft fiE-{t cR{ir{
cr${Ftt

'

*include<stdio.h>
*i.nc1ude<conio 'h>
rnain

rgr

cetFl|T

Fr{t

fr

cemnR

int a,b,x;
printf ( "EnCer lhe two integer numbers :
scanf("td td',&a,&b) i
if (a>b)

"

);

x=a;

"

.-?

else x=b;
again: if(xta==O && x*b==0)
printf('The LCM of td and *d is td",a,b,x);
else
t
x=x+1;
goEo again i
)

get,ch ( ) ;
)

fl{

Trif flg T$r vqlsTEnter the two lnteger number : 4 12


The LCM of 4 and 12is 12
cemfiqF

qrq{frf
'FIFIFT

cemm #

\e s cltfrli|g

<|prr<ffd|lb vHr|ail* Rpflsir iqlT q-{r e<rtr cefHIrfrat

#include<stdio .h>
#incLude<conio . h>

main

()

float C,F;
int choicei
printf ( "1-:Centigrade to Farenheight,. \n)
printf ( "2:Farenheight to eentigrade. \n"
printf ('Enter choice :') ;
scanf ('td",&choice) ;
1f (choice=-1

);

print,f('Ent,er the value of Centigrade :!);


scanf ( "tf', &C) ;
f=9*C/5+32;
printf('The walue of Farenheight is t.2f\n',F);
else

printf("Ente:: the value of Farenheight :');


scanf("*f',&F);
c={F_321"5/9i
printf("The value of Centigrade j.s t,2f\n",C);
i
getcho;
c{Fffi

a6

1*

ql$ 4{{t

{ET|.F{:Centigrade to FarenheQht.
2:Farenheight to Centigrade.
Enter choice :2
Enter the value of Farenheight :341
The value of Centigrade is i71.67
1

{w

\5"lts RFfiRFf q1fu

G.a..)e.

E'f F6frlE

6sffi

(Loop

controlstatement;

-#

qs I cEFtfc{ rol;t dtrq+ qt {t


o|q- qo|R's <lT csH cfto qcq qet (Loop) <KqT srrcg
qq'l
EFfrr rK {-[qrsm q-{r Eet o,6&l.q c*EI{i =r<qs e3 r q?t dffiq{cq {lrfl.=r6ls- EiF
eIIf$ t c{Il.[E"i<& (LooP BodY) <(

qst

).

,F

a.. 6Srfu"l+ (Test Condition;


<T'i6 ery66, E"f <B< qT6{ ssqcf e6s'r-{c\9' cltro I qef ofiffi
,qgn* ot*q o16" 6S
q{qrr;K Gfum q"r dft:rn'rRrs frSfts ER glrf st{ ffil q-r
il ue.c<( F6 $ffiT{"efi
* '{frT.rSlE{ef (Entry Control Loop) e<<
* effi o.rfiE{et (Exit Control LooP)
qg1 qs r Tfufi qqr{t qm
fl-16'
efr ?FrSlE q6.f E"f .e- Fr61q g3g3 \rp'l1t 6S rdt{ 4ftq
q-{tfro qs rt I fu e&b or$tq Ec't eFm ffiq-sn< qT-$I-q'I <erynfts alqse"m d*
qF66 q\e$ fi\6{
<5&q{ "iftq't 3'-{r qT q<( s-f qqr qsTt Tt qersBf ffiF E"l Ue{ "K-<f {rrq
qrq'fq<R effi sr&m Wqr emq'trq cq-{f{
TGr I c.a..c.s Gcq efr o,rAE q"f
I

{et

fiTsomf qrEIqnno \e eK ErdFsntTfrfu

dffifidrq{qrFfotqu

{.

otBBK

ffi

ryt<er

cfiffifidR

{fu
{. Tlbfm efrc-q-<rq{t{ffi<t&ffi
fr capfEq {'f fi'ftrqs qqt <rEqs q-disT qof q,rfiE dffixg
*

qsrtqTqKm
E't <&-<,ra<f ft{rq

s-{T

16
r

* for 6fffi
* while dffi
* do...while dttqF
* continue dffi
* gotoffil

q6E1-

fr cqurR

qqrs

cqerEl

torqatffi

$t5flDTt F<I Emf-

fr cq*k* cs'r{ 6f3?T+ nt u' v*rR-s *T q-tqq silir q1i' fe; g!6if
<r<-q. R I q,f sioqrir
fr'fq on Er{ Er v.lag ql+6q? c$r{ErtE for
{'f *."" O*#,';{u"t, ron efrcncs <Fr{T 5;r
for {r'R
"n$T 'r.r{r a.il qn e# *R*.E*
,o,

dfufn

qrfi
rrfirb

"'s#";#;"H"*ifu

qrqr-

CounterDecleration;

for (Counterfnitialization;

Condition; CounterDecrement/fncrement)

/ ,/ Statement.(s)

CounterDecrement q(rf U]qw CvtT Fftqrrq qBSR


6gfrrT-fi CstT.tt siil EF,
Counterlnitialization q<f,.f TIUiK ffirsEFT
$q 6q-Tf {-T, Condition q(rf 1l1BtK
ffi<r
c9Rrr'{rqr l-gfs $T
Wy nfT fr{<["t1 ng'*-=.f **'aornterDecremenUtncrement
qqFi EG<lr qT6r+ otB+rn
csRrr<re-<.qrc&frr nT{

R"

+ c{qt

m *;; ##*n##'m" **
for qrfc cql cRfi? cfbntr q,*rtfru qcg

"nfs R<f 16 qsi afiof "Fis


e.Tfro-slr EFfr-fiqqi fo,. futurRlu"".unqfr.r*o*

fiffi ffirs

<r-{qR-f cqp,lT # qa

{it

T{F{IT t

qsfr fi(ffi dgD.* qrrFm*r qn


f.or qqi eafr cqHto fr{t

qt{r, Computer Science

#include<stdio
#include<conio
main
t

ffi

c qf*

qqft

re.fl qf-{

h>
, h>
,

()

int i;
for ( i=0 ; i<5 ; i++ )
Printf ( " \nComputer Science,') ;
getch ( ) ;

..

;:

Output

Computer
Computer
Computer
Computer
Computer
Computer

vBlR-{
qSIFITT

Science
Science
Science
Science
Science
Science

ceNilT

# qa s qrF rqwr

fr{

Tf rsR -r{' go <rf cqrttf<

#includecstdio. h>
#include<conio. h>

main
{

etfr

ffiTrqFff_

()

int. i;
char word[50];
printf ("Write a word : ,');
scanf (',8s",word);
for(i=0;i<50;i++)
Q.sc

fro qoF

E{r s c{Fff6ffi {1fu

printf

"8s\t',word)

getch ( ) ;
)

Output

Writeaword:Computer

Computer Computer Compuler Computer Computer


Computer Computer Computer Computer Computer
Computer Computer Computer Computer Computer
Computer Computer Computer Computer Computer
Computer Computer Computer Computer Computer
Computer Computer Computer Computer Computer
Computer Combuter Gomputer Computer Computer
Computer Computer Computer Gomputer Computer
Computer Computer Computer Computer Computer
Computer Computer Computer Computer , Computer
fr cqFtltq col{ cvfirrrf for cfiEnrfil <qCtF csfrcs?rq R[trr{ <rrqrir 6{ cwt Gfts qr
tll'ir I qrrM'ffi
szE fr++ ceNlfcq slfifd cgRcr<ffi{r 161 q[eld FIT rqi+d :ffif\e mfslf itff
'tsrF
elef(o
qis9f
iail
rffif
for_fl
6{f,6!5
q'K
T{t-{fr
for
I
6scs
{cr
eTF for E{qr<qld
for {Gel{ Ec{t
q{fu
et{T
T[{t
qT I ql<K Condition 4R CounterDecremenUlncrement 9({ for cBffi*
qfs qq?rfl'srElT :[mt firq'tv
cstT6|t qt TGr statement (s) q(r'f\e cslT"ft ffil Tfs I firt ) celtrF )oo
c("rIerEI En{ffi{ q{I for Eef <r{qr{ ar<t qsF ccNHq cqfi Erqfqtlr eTF cetFt|Ir
$-{qlR-S ceNlT # qs s ) c{rp loo ffs cR{fia(qEr:rr{t frrq,lg c\{fiqrEf 6{-?r
I

fr.t

:pffi

#inc ludecs

tdio

h>

#include<conio . h>
main

()

int i;
for(i=1;i<=100;i++)

if(i*2!=0)
printf ( "*d", i)

getchO;

return

0;

sa qs5q fr66 TFIFFGT qCft WT1 3 5 7 I 11 13 15 17 19 21 2g 25 27 2931 33 35 37 39 41 43 45 47 49 51 53 55 57

cqFflTfr

59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99

<r{{RE

ceN[fr #

\q

.{TF rsrFw

fu TI Fwt qtl{ Tqlffi

12

123
1234

123456789

qltu

ca$fr{

-?!-

fi

cenqR

$Hfift{'
#includecstdio.h>

:.

*include<conio. h>

main
{

()

int i,j;
for(i=1;i<=9;i++)

.:

for ( j =1; j<=i; j ++ )


print,f ("*a',iy,.

printf t'f""

getch ( ) ;
)

iunqnF ffi' riirr'r


1',
12

fr68--tr

T$r

vaTFFq em.Ffs qtr<-

123

1234

12345

123456

234 567

1234567g
123456789
v-{@s ctFilq # q}
rI{FfFr

-,
s

rFFr eoF

c(rrq qFor ?l er{r cbfu fr.fGr{ ,{$F refiEfi fr.r

""':

#incl.ude<c;r;:;'

int i,n,prodi

prod=h* i.;

print.f

printf ('Enter a number : ") ;


scanf.( ntdn, &n) i
for(i=1;i<=10;i++)
t

'.:,.-

#inclrrde<stdio . h>
{

r:,' 'r ' ,i :" ,ii'

("

td*td:Bd\rr" , rl, i , prod)

1r {,

.,

geEchO;

cqprt{F rFrrcrftr.trqqfi&hffi fr5qqqrsE eqffg, qREnteranumber:3

..'

3*l=3
3*2=6

3*3:9
3*4=12
315=

I5

3*6=18

3r7:21

3*8:24

l:fi:],
t\bq

FI

sqf

\3

Cqltff[q{

q{fu

qfr{ I qfiet for qeiro cqr$s for ff


eaF for qt cBtrrrta rcr q{r csl{ csl{ for cBttx6 elFFcs
q{ Tfi qr r qtEbt<
,4q( T{rs* for EefRt inm (f nn"O for qof, <Rq for E'tro TEBI- (Outer) for
for q"f trBffi< er<Tqfq cc'4.|'r{l
tor $,f T{ t{t* 161qceK <'fq 6{rr Er r c.a..c.s G'@ c{cfrs
{rafi

... ...

for (

... )

--G--6ft
qr*Nilrt for

for(
printf

ffit

s\ttorEl6B?mrf*fi

qqT<.Sft-{ Tcqr 6o|qq(qqf frFTs

; )
i
("\nThis is an infinite

loop")

DGT

litr-61

cT:n-

ffi-cs q$ I cftstg for {'l qftq TC"f qfr<trq E[s'efIK


i-nut* fr{R <s s-dm qqr crfi<q\o ctrl+Break ft uHF qr, Rsf corq rorq
ffiF re;rcs Es I q gi'{F for qqRfi? c$'l-{ cEufcffir TlftFr Tfi F<t;r *ry'g4E'td

\5(K 6AFr s{C{ <|q.frcar\e

qfu;rfi'trtt .*
ffio .hqffir

frfrRrFH

BrCI.r

fireirq goto <rrfrF R<t exit 0 rFlR'lT qj?rqs qr


q'1.{fr{ CeNtf{ # \r} s rfi{ q\"|}l dfi-ofrqrqsrfle ffiT esF cEw{fr{
I

ttltFtFr

*include<s tdio . h>


#include<conio . h>
int main(void)
{

int num, i, is3rime i


printf ('EnLer the number to test: " ) ;
'

scanf ( "td" , &num) ;

is3rime=1;
for ( i=2 ; i<=num/2 ; i=i+1 )
if ( (numti ) ==0 ) isl)rime=0 ;
if iis-prine==1) printf ( "The number is prime' \n')
else plint.f('The number is not prime'\n");
getchO;

cerH|{F {FrrFcr

Froaqflufiftqpfirrcvnm

Enter the number to test : 11


The number is Prime.
Enter the number to test : 10
The number is not Prime.

e.sb

Eqffi5 qtrt'

fr

cewfiR

whileTf
,t cemrnt q6 crc.lrm qR <r.r-rstfuo

<K mr{ 66tr6TD qqIF[ s-fl3r qqi white c$rcv$ <r{qg. qr


qrt<sr
etr
tor cffbnrt fi-sq' Rrqrs <Frq-s $ r for oBffi< rc
6{ mrR\' ccrq srvBt{
6ffi3s-fi <rEqT sc-rt while dP,cqrBr q<6{ iT(fi
$st qs r frq *iite qt fin-cr.r* TRTflb
I

't6rfi

CFTTET{l-

CounterDecleration;

tial i zat ion


while (Condition)

Countertrni
t

/ /

Statement (s)

CounterDecrement, / Increment,.
)

counterDecleration \T(r{ S"|{'e 6slt A*rryq FtUqT csR6R-<E csln"fi s-dt qs q<!.
Counterlnitialization \T(r{ \olit EKB-o Tlq fr{K.f <Kt,qr r Condition q$.f TIB.BK ffic-s-<[-qa
EVtv nFr fix+ q-9m flT frfr{ccR s-dl'16 cq-st q$ r( CounterDecremenUtncrement
qfrsl" qnfq otrq oFSn c"ftffiFr,Rtc/!frr rr{ frfu s-dt qr
Condition qqt ql?Ft 9l{s while {c'Br ck?r qqffi
fidtfu qno et|rs' r white qr"f< nBf nfiF
qFfltr'ls
qrr
eltr$ I Emiq6{ esD white qcaK T6$ qq{ c-fl;t white
6f?txrt
rqBs
<t for {'f <Fl-qlT siil CTCg eflGt I qtrT {<rrTq white {et6p C{Fmu while
{n <ETI qT

sfi

dffi

6*ffi

{'f

ottterwhile

fu-q-c.{.c.y

cqc$\5 white

LW

6*DNds E-{R6o

fi'ro'while q'I 6fbnr8 <r<qK s'r* 5 cer6f )oo o6s q<\ ) cqcF' n (r$ftr+ n tcqt ro1{ 1-{qs
't{
rT(fi) "Ffu $rf* c{Ftv'qfi"fmfrqtF cqW{ cqrtqffi
,tr{{frS ceNtFf # eo g )+\+e+8+.
....*}oo {tTtT ffitrf$-E fr.fGT eTF CEH|T Ff{t ,
q?Fil, ! ccttrs 500 ei6o'TsE {qfqsc"mR cqFrTqfr{rflT cqtEl:fft,{t
q{Fflrrs
#includecstdio . h>
I

;i;;i;;;.;;;r; :;,

rnain
{

int s=O;
int i=1 i

while ( i<=100
t

s=s+i;
i++,'
a.gb

s?r a{Fnifi'i
)

printf("The

sum

ffi

of the value is *d\n",s);

getch ( ) ;
)

(EHI{F

rl{

s'c{ frrsr v-qtv-q eqffio qcq-

The sum of the value is 5050

.....,..+n qstK cqltr{rdT fr{r$il qsF

)+\+e+8+.

<u-{i{fiQ cqF$q # \?l a


cqHNfr{ I c{"ttcE n qrEt cFr
q:IFIFT

inc lude< s tdi

fitET q{x<tlit

h>

#include<conio. h>
main
{

inc s=0;
int i=1;
int n;
printf("Enter the total
scanf ( "*d", &n)
while ( i<=n)

number

of value :");

t
c=e+ i '

i++;

print,f("The

sum

of the value is 8d\n",s);

getch ( ) ;

t*-u

Kt{ <'6{ frcu-{ q{qr w?r Q{"lB ftrq TEIFFE Eqffe- q(q-

Enter the total number of value :50


The sum of the value is 1275

Tt

do... while
fi ce$tc{ -t6

qsfta rK coFr 6fiffi c-{tqrffi sr-{r do dffi rr{qs Q$ r do


dffi white 6ft8m6{ qRlsT qtv-t slq sr{ {l I do q"r Gfib[{Brs qrdrs tFt$ do dFcrb Tdff
{s r white cftrm6* ng. TF{ cqtRs csr{ s.lUEI{ csfrr-T<E <Fr$t rr<t do 6$trrrfT qle6 c$n
qr q<\ 14T6--rt c-.'Rf fr61s 64jrl qr r frq do Eet fr{qp1a rr*t;|D cq$ q'ffit'f"f{l' T-{l

ckqrr qr

CounterDecleration;
counterlni tial ization

do{
I t st.at.ement (s)

<t

) while (condition);

/ / Semicolon must
counterDecleration q(r-f EqW 6e?t DR"FI'{ iqrcg. ofitr-fi cslsfi <KI qs q<q
counterlnitialization q'\r.i \5'l{ q|<Bs $q fr,ft{.t T-{t qT r condition q(r.f ?3ll'q csfu{<rs-<
q-{'16 cq{t allrs' 4R\ CounterDecremenVlncrement \n(rf qG
Es-ls {Fr R<t Wts TR frfuq
qir6{re.IrqolBfm
Aq&frrfl{fifuIq{
I

fr cqwffi white {6't{ fr-sfi Rrcr{ do qet <r{qs qs sr{ while cffi q?fm c(eF {6 qftst
t qr r {6:rsr ctl-s,f qI["|cF white d}OtrrBT ctcer c(nB OmqX qqfts e3, qd cqr qf
1

Q.9o

fr

cqNErR

dffi

{trt while cfBcq[Ar clcf cRftB


c-"nfrs qs Tt r
do ottcwf? 6s@ eFfm do {6,F{
cfc{ cRfi? cftorb es-<lT q'p{ffrs qT I \trs8et3r white
qqep .1-$ {fts1 Tit qs r qt $o
clcat
{H3r
qqr qR{ cEefts do
qBet
q<ffi'
6*brvg
qs r q{e, q6 q-sl ot
Tof
Oo
qqft?
cfrif
qr<tir
dttr$
TcoR
cqfr-rc qr I qq-{r TlFr {qsr q?F{Fr cfiT T|q r-{I
T{s'T
qt{:lf<t, C{rF6E do qef TJTqKtr-{Iqf{..R-S

dffit

fu

l\fi}

<*

irr{{frf cqHT#

sr, e l [?rrs ro i{sq<rB^ter.qf ef4'frfiqqi esF cerw{fr{


rFtirfl{ s
#include<stdio. h>
#incLude<conio . h>
main

int counter=l;
do

printf (,'td ",counter)


while (++counter<=10)
getchO;

i
;

cefFffi ilq rrs ficu-{ TcflT-s Eqffe <E_

12345678910

ffiscFnq#\es
smq t{cR.[t
ftttrflT r
#include<s tdio . h>
#include<conio . h>

) relrsn "r{sqq"rfief,qtEq-ft{Tq{r qsF cEFnTfuI rm{fmnRrqlCSFr

main

()

int n,counter=1;
printf ( "Entser the total number of value :,,) ;
(otd,,,&n),.
scanf

do
(

prinEf (ntd u,count.er)


]

while (++counter<-n);
getchO;

6{HTqF

ilT Trd

frrE-{ qs

tr{D fisrf

ErE TEFF{

Enter the total number of value :2S

qqffs <T-

12 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
2s

.n.ry esF do qrqiT {cqi'q"FT qsF while qef, do {,I <I for {ef <rqqK ctt 6TcE etK I qfret
qem ctr& Tt <6rr E{ r qKR condition q$i
Et <T s;Ro {sfrFrE 6ffi fr5crpam
1ry|
qgrcFl;tq6o l|lr* | CTl-{char ch;
do{
printf ( "*c',, ch) ;
ch++;

t.c)

s{t

\e mFfllrnrr

eKlb

) while ( (ch >= 'A') && (ch <= 'A') );


ftqqift'{ cqRl:t # \ra s A r<rm Z "116o<g qTrgit qqn-<tsrqT qqzim{ wrr qTfr

ceIHIT

frat

JFITI{I{'t

#include <stdi-o.h>
#include<conio . h>'

main (

char ch=65;
do

printf ('tc',

ch);

ch++;
)

while ( (ch >= 'A' ) && (ch <= tZ') );


getchO;

l
cqEWD rFr ?En6r fr6pq

ABCDEFG

qqlsq qq'ffe

qrq-

IJKLMNOPQ RST J r'WXYZ

continue 66FLTD

fr

cqWnn.r6s-6 qeF{f lffiANRT 6sF


TJTqs ET I continue .fit[Tril{ Tfiitr

6fffi

{t

Tc"tT

T6f{fr

?Ffi<r

qqr continue dftxrb

Torrrirrrr",

$<q dtmt ap qnK Ql;rB eqd scr I continue dBffit


rrdqR
qM
rtfq F elGt {I I \ftrr -|dRfu continue 68ffi lTffT
M
q
qc"la IF inr* r qql'qKKcls if, etse... if 6Etc{TtT qfc{ qqfro t6 rflrfr.lr crFI {c"tir
"trrt1fr
aTilT q'{j'continue dffi
<Frqs {T r cc 6TcI.mdr Tl+ cst {Ff continue crBtrtrB olf<fr {g,
q{tqfn <;qtfiT continue cftrrF ffi srg qT{fi dt6{S ffip q5s
continue 6flcr+
if, else if, for, while

cEFn{ qLTEI*KT

dfrrqc*{TFf-6T qftrromqli'TtT{tir

continue
F7 ft(s| Fs ft 65r"f (F7 \e F8 fts?ll@-c{ffi
fr++ qqtqf6f{ Run 6ll{s Trace into frt<t Trace out ql<rr{F c(rEFef ft) cqpnq fr-{Eq-s

{lRT{lk{uT cq$ c{(g 'IIG[

Fq-c.l.c.t r continue

cfiffia ef<fqF-q

tct

fr cEHfr(
continue
q-{Ft?

csffi

<I{{T TcI ) I?lm ro "6g >R"ljTcTqr r{T

q($qg En.ftffi.arB cEHt{frrl

cetFilq{R #

cq$qrEl

uc a ) relcF )o qdsq$BFt{rq{q{r

Er.ftqrqqT erF cqHlqfr?I


wFfn r <{il{FF, qq cq'sTlq(?rnfrq(E 8
#include<stdio . h>
#include<conio . h>
main ( )

ceiriF

r{

csr{ esF x?llT <Iq' fuT

celGprq

con erBc(qlT{m ft'r{ q-{fi? c$flq.ls

inL x;
for (x=1; x<=1
if

(x==4

0-

x++

continue;
PrinLf ( "8d ",;)
)

printf("\nUsed continue to skip printingi the value 4\n',);


getch ( ) ;

iqtEtqF ilqsi-cE fr6s-sq-aa-q

123578910

Eqfi6Er{-

Used continr,re to skip printing the value 4

goto dDI:IE
cqwr,q qeTs qqro {e1?t{qr< qr dBcr$ cattrF So|-r{ <r fi(5' qet{ c$;r
fir-q"f
Emg.rf,{sF{f goto d?art<f+qsEs I goto cE?rq6n<a-qtFq5dTtLevelName:
goto LevelName;
,{{Im, cEcsEI (LevelName) cqHffitr o-E+ cq'{T cEHfrffir con qF frcf.fs 4'{' r LevetName qsF
qftsFsls'fT | {q{tR. qtcsfrT]Tfd qlTsrFl3t frTTEsTft cr cs'l{ kq LevetName Tt{ql{ crl (Tce
cilf,g r LevelName qR 6.f6{ qTF cofcrqfrroq*

dffi

fr

qst cEHlT<lFl\.Rn qrlMrqfr{G{416q qolfrs ffic@T dffi<r<q<Til c{rs"offcn r cEm


dBrtrS goto csffi*E"rm<tfrrr<lrr{l{T-dl c{cu ettm r goto dBcnBaB"icr cdrcsE dffi
<I{qf6S{ e-el+-s continue dffi $T{K T'rf CqHtCT{ clT6{ RTI prqln R cs{ qIil ql{lts3r <r
qTBf W?T

;; fr goto <rK sGr CEFIW <I{qs rsl{ Tl\.kn R\<t oc"R csFr qrei{ w$ q-<@ c{cwT
cEBrrB ffiFlio qlm ElTls{ qt qP{ F-{I Tl{ r goto dfin-B if, erse...if, for, white ffi
Rrs,I

c-dcR Oq rrcs {lar r \5r< {KFtqe goto cfiBrrr$ <r<qn s-Gr if, etse...if cSBmrBr qfral q-{fro
Il-d clr"lm cqHftrt-<t \TeK crl{ ql6{ q'fsf s-{l ES I c{ 6srEI .frs? fl{ rvl' q6 goto
.'rr'flq-r FGr I goto
ol{oft q{ r qqi?lfs Fp,fliql< goto
Brtmt o-rf,
q{r
dtixrf* or{oq {ftst TT{ {K <lir F7 fi\<f F8 fr 6D-c"f CEHI{ fi:{t6q.{ {Rt{tRsioT cq"tl Fco
"ilm

c8ffi

"ffi dirr+

Q.9\e

ffi

\5alts c{FllIRFtE{fu

while ( ...
{

... ...)

for (.. ... ... )

Blockl;

if (Condition)
Continue;
Block2;

if (Condition)

continue;
Block2;

dDrr6{ q<rqfo
<rtqlfrs cetFilq # ss s ) lcttrF )o +fu qtqnqq qq,ftffi qry esF cqwT
FE-c.t.c.lo

s goto

qTt{Fr r

fr{

*include <stdio.h>
#include<conio . h>

main

int. count=1;
start:
' if (counE>1O)
goto end;
prinE.f ("td ',count);
++count;
got,o start;
end:

putchar('\n')
setchO;
'----=':'

'cEFmFanqoglsforsqflTqqqftqn- :
129578910
rritqlfr{

fiql.s

cqFtFr

"1,f w<tlif

r:

# \eq I ) c{trF n 'lds,qRrtff[q qq'.fmd q-{r EqsF ceFttT


r

{qFflT t

*include <stdio.h>

#include<conio . h>

main o
{

int n,count=l;
printf(nEnter the total number of value :.o);
scanf ('8d! , &n) ;
start:
if (count>n)
goto end;
print.f ("td ",count);
++count;"

t.t8

fr{ r rfirrr

n {rar[

6<FFr

fr c{FfiRi
goto st.art.;
end:

putchar('\n');
getchO;
)

CEIHFF Tl{ S-{FT frT5T qqFFq qqff6


Enter the lotal number of value :20

12 3 4 5 6 7 8

lI{{lR{
fr{

C{FilT

Er{.

10 11 12 13 14 15 16 17 18 19 20

# sU c )

catro

n fis r{qrf t{

qq{ilr {l<l{ 6qlfls-{ frqfur

sTqr

qsF

cgFffr

qqK|{ s q{tc{ n {cqT f,sFr ffiqr{r


#include <stdio.h>
#include<conio . h>
main

{'

$n<"tnatft-rtm6t{s

cq\e-Tlqr{

int sum, i, n;
printf('EnEer the value of n :n);
scanf ( "*d", &n) ;
sum=O;

for ( i=1; i<=n; i++


sum=sum+i;

printf ("The

sum

getch ( ) ;

of the value is *d\n",sum),'

rr{ s-?rm fr6o-s rp-aFpq qqf{o<TEnter the value of n : L00


The sum of the value is 5050
cqlenTF

C.Q..)g qll6fr

(Array)

.qrF rKfdcI osRc-T<uET TIcffi qfgvls crrrfrts "FroFr c(<frs qrt Afu{ Tgsrrtf 6eAr qnE(T
qtrrfr 3EI qs I qqt sallT, q161Eril ..crt ER'crrT rr$arfi efics{6f{ arB r q'IGt FRc-Tfi q
flir, .c<E brtr"r< .{<.|R<r cft:Tqrs["f qsr r \Trtrd qafr &-fiEsu. aft btt"t I cKKcf FfirLl-<E
65?T bRq"rq qrrrr reRrn-q csRcff{ ermq-{ Es r qTr{ cst{cff{ cl{ltrt
csl{Etd {s <I?fqrcffi

F-sffi

q6a1-

'e{

DataTl4pe ArrayName lArraySize]

DataType cs 6o|-{ fi+t{ qI s$T osbr ilt"t, ArrayName cEFIIrlit qfo cmt wtm
qTlrr csfrcr-<rE{ {l{
csRc-q-<rE-{ 6q c$.|ir ?<E T|T q<( Arraysize "I{ c({f{ effiFFo c$l{ &5-{ :tl{ r
qtcsFcwrr
qtrsrc.rt
qttwfrsffid
\o{t
fixlfETlsr \mrr @RF<r6K ?E{
esF
| {s-dR ffirr'{q
<qfrT '[ ]' qtr{r qjrK qtq, frfr*q s1il qs Tf qilcr
{lT crtst cTcg, 'tft3r I qtl6{3r qIT q(qs
qcr;
et c$nra qtlrf{ l3rsg (index) <sT qs' q<\ wtrtr{
c$lTf fircftt
FRcfl-{m
"rr{rw cgtr<
q&tr'rsq csRGr<-qrsqElflqr{wrTr{B4tqt{ (Anay Element) T{f {s

q{ft{,

vft

sqrqffi c
char Name [20];
inr Ro1l [L0]
float Mark [5]

I / char tlpe array


/ / int Elpe array
/ / float Elztr>e array

lqc

sell \e C{FfltRFf q{F

$"rcnv Name wl(.<ir B"nqt{ {cql a Name [0], Name [1], Name l2), , Name ttgl r w{gqqrs
Roil qirfir B"nqE qrEr 8 Roll [0], Roll [1], Roll [2],..., Roll [9] T( Mark qncl-{ E4tql{ qmf s
Mark [0], Mark [1], Mark [2], Mark [3], s Mark [4] B.F<ll, Wtrs SqtqlrcrqlT {b-<F tET (o) cenm
ec qT I q{r,

:l:'.:il",13?]'
float uark [5];

w]TnqrErro{QlrcFrrr Name [20],

RolltlolRilMark [5]{lrr{S9flqtc{-{q@ of

mrRcs rrytca sRc*-qE qqlrr[crd cfr.tE


fr cqwrcq r{Fr f$'Fr qtl6{ cqlsclt T3$ qs, s-rfq spil?sK w1-< Ffrcr{t-q'* csfi at{ q<( cltrq-{
frfrrs dqR[s "13"1-6 6-wrFTt {et Gfrs s'Gr I qetm fRs qqf c(qil cttflTqs qnm sRGr{ffi{
Tl?F c$fl qq( qT E"nqF ci?tf{ ecl+TEit rflT qT r 6{116[, B"tr=gfe Name, Roll e Mark $qns
qrT[<ir q-{r' 6q{Rro q]Tr{ B{trdq\6rEt qtrq t{R \o (T&) TliF sr{ sTlrrff c(<frs E-{ I qsrK
qTrCsr scnqwcq5 Tlq qqrfu qs I Kn;tqq-{ qF{
"FfiT4TT

int Ro11 t5I =

101

702,

103

, 1,04,

t-05 } ;

s frfu qeil5gl1.q
fr ceHrrr <r{q-s. wIr{ FRrr{6il{ Efrfr B{rilT qrs-sbf qsq ffirT-{rq-{ rs rlq r(*t I qllGr
refrrq-{rqT Frarqf <i fu4{ T'r{-s6 Eflalq cEHw{ R coFI qftT q$m'cltfl{"f ceRTs{FI-{ I\'
qftfu+' a ffifuE qop5s16a rrqr{ TTI slT I cr:Ftf loat l'tark [5] ;
floaL Total= 0, Average= 0;
Total = Mark [0] + Mark [1] + Mark [2] + Mark I3l + Mark [4];
Average = Total/S;
o{ffierqf ?<q r\TKrgqTft{Bqmlqq{qra c{ mldk{Qqrcg' cstrftT-{qEkils q(gcs-{t:llT q<\
qFcffiia qs{ qrgfr( ,f6B qks q-{eF I fiffi=
for (int i= 0; i<5; i++1

qtfam Eefiqfn1 ffift5-q

scanf ('tsf", &Mark 1 i J);


if(Marklil>=0)
ToLal = Total + Mark t i l;

dffi'erqf ?<E rig"r< csFf qflrr 6fr6sqr6mql:rca qa-sqf{<r{qf{T-{t{l{Tf


q'Ir{ ffiT{ff{THfr{KT
wL< Ffrcs{rdm q'rq frf{q <drp wTmsr $cxq1qs6flT qqr rt{ fi,f*qro {<.rtT I Eset {l{ fi{K.r
I

qfrF{tTq\o qttlT,ct FfrGKcET qnfr'ft{.r qftFflT \r-{-s{ I qrlm Bettnr;K:il{ frf{r"t< qlrcu<txr
rfqfu \tr{:tiTcf s-?{IqT-

ffi

).

qIIr{

r..

q-tlG[ cqllfqi< q-cr

e.

CqFiGtI< T5T6S

cerpnqfi:{[rqrq:rs

tls

fr

cqwFR

b{tqtffd qlT fift.t


e EfuTK qfir* ffiF"ff{ c.,:l$ qrlr{ CvRGrsc.fl{ osFr Frt'r q{Ttft fr-qT <-{ft-{ qc<i E&F srr{
geftqfff{ sl-{I qtrtqlgrr{ {rq cq-Tr qs I qGF {lr;K T|r$ eaF rr{ qFfulTF<F s'st T[q r ,es'i El"[
fr'ft<r"mT-<$trqmmFrtEr wm{ qrtrd

DataType ArrayName [N]= {Value1, Value2, Value3, ..., ValueN};

Eqrqilf
p

char Name I5l= { 'M', 'I', 'R', 'A', 'Z'}i


qelm ll{ fr(r{c"K cw.rq frft{ <-{ft-{ 6p6q cqfrTolq-{ qK$'T I q-<rtr cnar btt"f
Cdqc<\s fr{-{"ls-{t{lT | 6T:Fchar Name [5]= "MIRAZ";

qrc<3t

rl{

B"frsfo w ceHmRrf Name \TflrfiT Name [0J, Name [1],,Name [2], Name [3] s Name [4]
EonnmerqRgT{r{ellws.'M,, '1" ,R" 'A,g '2,wqfrrftRgqrE
qrqq!fr{ cetFttT # \el a Name qr[i3t Name [0], Name [1], Name [2], Nale [3] s Name [4]
gfinqaml* sr{i rctf@in 'M', 'l', 'R', 'A' s 'Z' :rl{ etql{ Gt q6qf r cEFm fr+f< "n ilq'T-{lcq
sF TEBtmK ficq l\rtnAz 4{F Eqffs qr<
r

'FIFfFT

#include<stdio . h>
#include<conio . h>
int maino
{

char Name [] = "MIRAz"


printf("tc", Name [0]
printf ( "*c', fame [1]
printf ( "8c", Name [2]
printf('tc',
wame [3]
printf ( "tc", Name [4]
geLchO;

cqWqF rlq T<ftq frr5-r TFFTITFq eqfu qc<


MIRAz
e qftFflT 51s ffi-fr{ Tc$" 6q'{t qlTr{ S{trdffiil TIFT c'(qTI ctfc{ cfftsr q{l{ q\s$ ql{rlto I \5r{
g-trT TFntqFr Eq{
6sr{ qtfm{ gexnqerql< sqi ftfiRe rlff{ c(fi {fr wlrr iiltqr cFcr r:t qs,
qR\
q<fi?
$o[qFsrElT El{
c{6<F Ets TF{E6qfrs qrfr{{ qsfu@fr-s S"nqtr+* ff{ fr{{{ srd
I

(o) tm r cw+-

int Ro1l t5l = {101, L02, 103i;


floaEl,tark [5] = {50, 65.5};

ffi

B"nnnr* T|{ fr(r{q T;II qrr6q r qR ,ccsm


$qq1q RFE, Rott qlmcrg EEI
<'qnq|r 101, 102\e 113 flTffir$TcflST{ E?tTffi$em4 Roll [0], Roll [1]s Roll [2] ,{K
flq fur< frftq o;rr< q<( \{-{fi? Rou [3] rg Ron t4l Sflqrq qttr{ {l{ Tdi' (0) ftftrr TR-Git
q(Trq
\r{mqglrc<
B,finq Rfi? uart< qncno {&'Rfr E"nqlffd rtq R{fg Til qrre I
s.FntSK 50 \s 65.5 rt{ Eefrrs q{Ed:r qRlT RF B{qf{ Mark [0] s Mark [1] qr {lr RmrE

q{Itrr,

4ffi

qt

ffi

e.1q

\5?5

fr,fi<q T-{r< q<l Mark [2], Mark [3]


c,qEftcr{ 6qMecEt

qsj'fu-

s cTFIfRfia{fu

Mark

t+1

Sennnwnm Tr+

T{t

1oy

fi{a.r

o-+cs r fr'cu-{

#includecstdio.h>
#includecconi-o . h>
main

()

"?

int Ro1l t5l = tL01 , L02, 103 );


. float, Mark [5]= {50, 65.5};
for ( int i=0 ; i<5; i++;
printf ( " \nRoll ttdl =936 Mark[8d] =*.2f ", i,
getcho;

Rol1

til , i, MarkIi]

'i

c$ilTF rl{s-drqfrrrdrFEfs-{
Roll[0]= 101 Mark [0]= 50.00
Roll [1]= 192 Mark [1]= 65.50

Eqffe= qcE

Roll [2]= '193 Mark [2] = 9.96


norr
Mark i3j= o.oo
Roll [4]= 0 Mark [4] = 0.00

[si= 0

rsF qfirffi Tqrlrnt S"flqtrffi ffi T{I ftfu srtir s1-{'firu-{ ffi$tr <raqr{ TTI mrs qlcr
float game t1_01 = {0, 0, 0, 0, 0, 0, 0, 0,.0, 0};
qirrfro {(rr?r qffiqcT F-{-(9 Ft(5-T s-flffis <I{qK cII TK
float game t10l = {0} ;
{l{13tcli5, c$];t qtlc{ csF"iK c:iT \5lT q'ltq firflTt GTr\5 Es if6{ ffiGTg 60.|{WTr{ ffirrclK wel
qftq sfr frqT <Tft-{ Tc{i q{ S'nqr+srflT Tt{ fidmq sil Es sT ErE qrfm{ rflqq q| frr6as 56E
R:n'r

int Roll t I = {101, 102, 103, !04, 105, 106, I07};


qrsrq r""fltqlT fr-qT <s.fi-{ '{ }' qc{r EIs c{F B"nqR cRqnrr \ryf6f{ :T|tq RcqT{ {Gr 6{tr

w<T(

int. Rol1

l7

l =

{L01

3-A2,

103, !A4, 105, 106, tQ7};

,4<1.

int Ro1l t I = t10l-, LOz, l-03, 1.O4, 105, 106, 1-Ojli


Usr dtm'n q fltsr RFIB wnn c{Frtrr'6<
r

6sFt lt{ errs qlT6d Bffi.ItrK :rRfi{T.f


,4 elftilT rsFr qflrfr ffils"flT q'{]Re' qK

{qrd"I Nfrrs{ffi{ TF fr,ft{c"K figrq wrT csRcrQr"K


q-$tft
qBF
qFTIqlgTr<
q-{r
:flr fi'ft{q re;rl qil r qfuF $ffi Trcil e<rF s'rd
csbf At"f
S"rmrr+s
qnfurqus ccfrrsrfi (;) <m I qst {t{ fr{Krrr q'-ffitr qrEfData\pe ArrayName' [N] ;
ArrayName [0] = Value1;
ArrayName [1J = Y.1n"r.
ArrayNarne [2] - Value3;
ArrayName [U-11 = ValueN;

tcb

fr

cqpnft,

BTr$"r r

inE RoIl [5];


RoI1 tOl = 101i
nol"1 [1] = LO2;

Roll [3] =
Roll [4] =

LOA;

105;

B"|rd\F cEFtl{l\rlt Roll i{rfffir Roll [0], Roll [1], Roll [2], Roll [3]
s?nwm 101, 102, 103, 104 \3 105 $q ft{tR-s qr{

Roll t4l E nc'Flgrffir qql'

qf+{lftf 6{t{f{ # so g eTF Erqcq'{ 661-4 6ffn 'tu'q-{8f6ffi C{FT ?T{ril rFflEFm 101, 102, 103,
104 s 10S tq-qf qEq tGs 6{F[;iqscTqqTtr{wsfcTEq'tfi{qqt e$F cemilTfr{
I

rtttffir13

#include<stdio . h>

'

#include<conio.h>
main

()

int Roll- [5] ;


Roll [0] = 101;
RolI t1l = L02;
Ro1l [2 ] = 1-03 ;
Ro1l [3] = !O4i
Rol1 [4] = L05;
for(int i= 0; i<5; i++)
printf ('\nRol1 [td] = td"., i, no1l Ii]
getchO;

I
CEHFF TI{

T,TTTE

fr[DT T6II{FT

);

qqffg Er{ I

= 191
Rollfti= 1s2
Roll [0]

Rollfzi= 1s3
Roll[3] = 164
Roll[4] = 195

frfu

fr{rqil w{ qttcr t"nqfrdrd :flq


\r{{rtfr qem
qfuTm
,s
cefH|{ Fdrq{ qrs scanf ( ) sRrFr sr{{T Tct \nfrfi cEfrcfit?rd Fbt btt{
qrfm Eqtqfn:r q{r lrlaflqprrr $r afbn qs r qGF qlnfcr{ :m cqrfd qT qa{'&ft F{K q-{r
qf6 ETrfF qs fust TttET qqild c-Fr q|3t 5Tef66 qT I (q3fr'f T|{ fr6{r-K T.frtF qc-{IDataltlpe ArraYName [NJ;
scanf ( "Format,spe.iti"tl, &ArrayNarne [0] ) ;
scanf ('Formatspeciflero; &ArrayNane [1] );
6{FilT

scanf ('Formatspecifier",

&ArrayNarne [N-1] ]

trqKd.r r

int Rol1 [5];


float Uark [5];
scanf ('td", &Rol-l [0] ) ;
scanf ( "*f", &Mark [0] ) ;
scanf ( -td" &Rol-l [4] );

'
:

e.qb

Eqis
scanf ( "tf",

6q15tftq"f

q{fu

&Mark [4] ) ;

ffi

fi,fr{r"r err{l+ Esjfu ftvs qmf, q&F cftT S{qTr.K slT q-{$t wEn-?r
csRc-qs6"K o6t Btt"t q-$tft Ers Es I Gl:n, char bt{ wrcr{ b"nqt+E rFr char ilt"t q-s, int
Ht"r qnmr B{m;K Tt{ intBtof qs, ftoatfitof qfirfi B{tqtrd-{:r|q ftoatBlt"rq-{, doubte ilQ"f
q'flrffib'nqlr{{!l-{ doublefit{q*, tq'lfr Iq{icll-{ cEHlcq xqrFailrFEIqFrcs efr6{
qlTr< BoffqmT

qtrs osfrrmc{d ifltg fr ftl6f


cl{Brqsq-fir{ a{l{"ftcrK rrl{qlTr<rsqTr "rd-dyfr<-{ftT'[ ]':rcqtfi6mR's' $xsim\ryrcr-?T
ft-W* <f cfuT fr{n.f Tirt Er {t qtlccr reft-q-{rq cr{s. T.*F $oE ci5Bt c\TF"f s<rt ftr?r g.f frof"l
T'GT

I G:FT-

char Name t5001;

1TF, Name qrrcil{ clQq 500 qdls Name \[nrnF "r6Frs fu .lbf char
I sr< fr cqH.ftq crFr snrrs{ qlQsr ,csr{ cilcft cqrr.fi q| Tcr # define
c$Rtoqagrffia6fr6n$ fi{K"f Ta1{ts eq\e1r.u qRtf
I sq{.-

dl c(Ks.r T3rF
ffi 6fiffi E|dt

qsr

ffi

#define
main (

MAXSIZE

500

char Name [MAXSIZE];


)

*-t* q*TlS

q{lc-d\s, Name qtfrs{ qltsT soo ft(Rs qrrrq r


nTf <fcqqtn|{rs:|c{q65 eifm rsm "lK\nrtK{{ttq

<r<qlR"f cetFtf{

#include<stdio.h>
# include<conio . h>
#define Max 5
main
t

int i, Roll[Max] ;
float MarklMaxl;
for ( i=0; icMax; i++)

printf

("

\nEnter

Ro11

scanf ( "*dtf", &Ro1l Ii]

[8d] & Mark[*d] : ", i, i)


,

&Marklil

for ( i=0 ; i<Max; i++ )


("\nRollItd]=td
printf
"
getchO;

cltq

mF"tt

s esF +.rcnqr cs|q @qK {m qq ql-cm c*IE Tict q<\ "Rx]T qRa'v q{-{
q5s qtB?"tb Rffir< E-e csn qt;t q<( {ft.Fts qlH\o qq<q{q qtlm qtslrr

# 8)

tqet trqm effi


Eq'-.{ffi{qqr esfr cEw{fr{
rgftffi

"tffiq<'ilf

qIr$r T|vr{ qrlliil{


{qsT,

Markttdl =*.2f",i,RoL1[i],i,Marklil

cqEnrF rf{ <;-dlcn frcFT TKrFrt


Enter Roll[0] & Mark [0] : 101 56.5

frro Ef< I q-io3"1.{


Q.bo

firE-g s-EFffi

);

eq'fu qc{

frcqwR.
Enter Roll [1] &
Enter Roll [2] &
Enter Roll[3] &
Enter Roll[4] &
Roll [0] = 191

Mark
Mark
Mark
Mark
Mark

[1]
[2]
[3]
[4]
[0]

Roll[1] = 192 Mark'[1]


Roll [2] = '193 Mark [2]
Roll [3] = lg4 Mark [3]
Roll[4] = 195 Mark [4]

"}

102
103
104
105

66

45.5

74,5
85
56.50

60.00
45.50
74.50
85.00

ffi

# s\ s etrN q.tF
:tqF{l{ s brg{i cq, "K ffiEFc({fi

rrqlRs

ceNt'lq

a6

fr{
crpte-{rqffififrrqryftqR?ffi qlerf trs
em.frqr

qqt esF 6{Fflr

#include<s t.dio . h>


#include<conio . h>
#define Max 10

main

()

int f ibo [Max] , i;


fibo [0]= L;
fibo t1l= 1;
printf ( " \nFirsb 10 consecutive fibonacci numbers are
for (i= 2i i<=Max; i++;
fibo [i] = fibo [i-2] + fibo [i-1];
f or ( i= 0 ; icMax,. i++
printf ('t5d', fibo til ) ;
getchO;

\no ) ;

cqFnrF 11{ c-*rrq frrF-d s-qFE qqffq qrlf


First 10 consecutive fibonacci numbers are

11235813213455

CeFtr{ # e\e a qrTc{ Sflalff{ a.


cRrlTFT{q -tof qotu effi cEFnTfr{t

lIT{lRf

cafr<F

qo cI{s qR"R'lqT<{

rNi{r{

#include<s tdio . h>


*include<conio . h>
#define SIZE 10
main

()

int stSIZEl,j;
for i =9 ; j<=S1ZE-1 ; j ++ )
sljl=2+2*j i
printf ( "tst13s\n", "Elementn,
for ( j =g; j<SIZE; j ++ )
printf ( "87d*1-3d\n", j, s tj I ) ;
getchO;
1

"Va1ue" ) ;

]
ceTFNEfr

Element
0
1

2
3

TFiTiTFfrTUT

TFIT{FE

Em.fuqr{

Value
2

4
6
8
10

qb)

sfi

ccItrF cs<ETls

ffilv

s{rs
5
6

12

7
8

16
18

cqFtllnFf

E{fu

14

20

qtrqR-f clFtt{# sg s a lstzE];rFTqrrtr{0'llq'I{ry6$TFrratfsfi i, !o, !c, )8, )q,


eg, 8)oqbo b8 q<( ca I k xlTqr{d 6qFfE ffi clFr q'{I erF cEHfl fr{t

)\,

bo,

tt'{TqF r

#includecstdio

h>

#include<conio . h>
#define SIZE 72
main

int atSIZEl ={7,I0,L5,t4,L7,!2,90,36, 41,78, 84, 53};


int i,total=0;
for ( i=0; 1<=SIZE-1; i++ )
total+=3[i];
printf("Tota1 of array element values is *d\n", total)
getchO;

cEFtr{F rF[<r?n6T frru-* rrcTrsE qqFFs qr<

Total of anay element values is 457

qrfm B{trtw{ rrdrqq cfqq Tcir \flEB"F Rqr< ior fi&Xsrrs etq',{c{r s,crsF cEF{tT qT{t
cqqlqrdil

qfi

<tT{R'f cqHtlr # aa etoF dt ft-nrfrdr EFr6q qrE;r6o cl*t qm ,f 6s1ryq


{tanqo qq?ffi qfiq sI frfd[EFr w$ qaB ueNtlT fr.t
r

qqtt{tT

#include<s tdio . h>


#includecconio . h>
rnain

()

int i,p, n,.number [10] ;


printf ( "tfpe ten numbers:
for ( i=g t i<10; i++ )
scanf ( n*dn, cnurnber Ii] ) ;

");

P=0;

ni0;
for ( i=0; 1<L0; i++)
if(numberlil>=0)

p=p+1;

else
n=n+l- i

printf ('Total positive number=*d\n'! , p):,i


printf ( " Total n:gar-ive number=8d\D', , rr) i
getchO;
)

ceFffi ilT src

frrET T{qI

qqS fiqq $Elqq

qq'ff\o ErE

Type ten numbers by terminal(Key-board)

68-1223-79-101728-3

Qha.

wern

(r{qiF s

fr cqFnfr(
Total positive number=6
Total negative number=4

<1q{fr-{ cetFttq # 8s s .s:qr qaF cEFflT fi"l $ 6fr $eifficfi ,{TF wTr{ bEfr
EIFIK sEIFFq Rrft< reqe'rqrrs fr"rAs fr'E 6erai qoff5q

vc-q

sno

n5bt

<f'nn

IT{T{R

#include<stdio . h>
#includecccnio.h>

"t

main

int i,number[5];
printf ( nEnter value of array elemenLs : " ) ;
for ( i=0 ; i<5; i++
scanf ('td" , &number Ii] ) ;
printf("Show the numbers j"n reverse order.\n");
for ( i=4 ; i>=0 ; i-- )
printf ( " 85d",number Ii] ) ;
1

geLchO;

T-{rry fi(Er r-Elw qqffe


Enter value of array elements : 34 56 37
Show the numbers in reverse order

cqu{F rr{

<{

45 54

5445375634

ffi

q'TqlR'{ cetFtf{ # 8 q s qr{ q<ift cEFnq fr{ qt .{TF w'rr{


Tcr vlc\g cstf TFITq \fl<f{ TS1TT
qrs-rdr,
eFmft-rdrtfilTKtr{Tse(qlq($T\stq.Fca
Rcqr< refiernnofr{frg'fr-s cqroqtoilF I
qr{
frrs'
TKrc{
t;nFuttcE r w:e6 cR?tflErEl ft-rq|rd{
q{FtFrr
#include<s tdio . h>
#include<coni o . h>
r

main

int i,n,numberlnl;
printf("Enter number of array size : n);
scanf(ntdn,&n) i
print,f("Now en er value of array eLements : ');
for ( i=0 ; i<n; i++ )
scanf ("8d",&numberIi] ) ;
printf(nShow the nurnbers j-n reverse order.\n");
for ( i=n-1; i>=0; i-- )
printf ( "*5d",number Ii] ) ;
setchO;

iqcu< +elsq erq'frs E6{ r


Enter number of array size :7
Now enter value of array elements : 12 6 8 24
Show the numbers in reverse order

cEFnqfi

il-{T?tF

45 27

182745248612

Q.be

18

'

\5qT E

c{Ftfifi{q{fu

frqtfr-s ql'f6{ (Two-Dimensional Array)

qffi

ffi s

qq65 :il{r{qv qsflfr's' qilr{ (one dimensional) drtts I qr qlfr-s qrTrffi


6q-qq qffi qtR (row) qf @ilT (cotumn) qfsm qffro 1 . r< fi cqHfc{ qt <t'\r,nElfi-$
Tq|{ frfi? qnr{ <J-{q< q$ Tt{ I q$'et \Ttlrf,rT ffi-s qIIr{ <drl qs r ffi'-o qrtm

csls.6lK

v<qfr

fr

c$ElT{
g44qqE1

q(-qt-

DataTlpe ArrayName [RowSize] lColumnSize];


q{tr{., DataType c{ csr{ fr+t{ Tl <nt$q arOt Btt"t, ArrayName cEtilTf{ +9o cn* wrn-*
pfins-<cq< c{ cot{?sqilT *. RowSize ColumnSize "I{c$lls eloFie c{'r{g{nFrqftqift$
qer6;m ffi-s' qrlrfir wR qqqn s 6ilrr {q{fi TEI q{' I

EqRd"r

/ / int type 2-dim array


fr cqwrcq {Frs flG-g qdR qtR s @TFr q-{fr6 otfs-T q-$ ffi-r qiTr{ Tt{qK a l q{ | srr
int Mark l2l I3l;

q.'iF R\T \fiCq q<( ErqFF frqrs fu{ sT


qtrrs Tqrq crclT{ qnl{r{ TTI TIT I C$Fr- 6slT
o-an q-{t qIfGI
Trn qfiqtft ctcq r esel 6T'Gr eEqF fir{Lqr qfs ffi{ Rtrlrs re,rg T-EFFE
qtr{lTs.{t c{F EIr{ I qfref s'rffiTq-qrqj?rqs\ryrr<rd+-{TrFqrqt-

"tfu

#define Sub
#define Std

ffi

10

30

float Mark ISubl IStd];


ffi-oqrr<-<B"rtfl{

ffi'-r

ffi's
wr

wrTrffi mF E nqn c$n rflR c,({n q<( qflo *$trtu s{Trq-T qqr{ I qo rt&'+ qrrm* rc'
q1LT{ geXqperq|T T'T rrtqr{ T{i (o) 6efffi sF qr I Eef6r qaN <s,ft{ q<( frqT {sftd

Tdi

621-6E

"FilTEFc{

uF q{ qqq frfr{ <-{ft-d {F-f s,EI{ c\$r{

qT qs

qsset-{ eraN <-{ft-{

F.Gr

<g[u

wa qs $

etfrs

qs r:i 4l q'erl qds

qel:r <-{ftT

qm

'{<( frfrs <{ft-{ {rs T{t 6qr(s etr


qls s-ql{ rT(qf{ o[Tr qr q{ il q\3RT
+fu qem <s.B {u-o ct6-rrccs eo
qs' s.Gr {vF qlrs I qsltrr eFN
<-{ft-{ 1u-s ctR cc{f{ 6'rr qs rr rl
eBT llfu ffi-r wJTrn-<E"flq|q uf'fd
D-dI[gi attro

6E.m

0
1

2
3

Gq-v. \.s.

I ffiq{q.qKef frCf< mark

p v-t{m+r-*rr wnr<

qflrffiTqI {flTrsint Mark i3l [5];


/ / int type 2-dim array
B'cs{I, qtqlfr<6o Mark [3][0], Mark [3]t11, Mark [3]t5ltwllfrB{iq'rd-{qfrV

Qb8

rlt

ws

fr cqwfrq

ffi+qlrrrstr"ttctwdqnffTpr

fi

cqHrcr

Tll

firfu

).

a..

esflfr-{
T-?rt

q'rtm-?t

ffistm $T

I qmer TEq Eofi-s

Tts

fifu TRI Er cqt est FKrr ffio


ffi "66 **-

eo11fu6 q1r6ir stmlr+< a1a fr{<r"rE:q\o


wir-<-T qe lttR{ q-qi qnmr frfts

ffi"s

cs'ft{ w{t qr$&"s

qrrr<-s Boffffisrem

wT(T gom6;K

fl{

fr,ft*c"r*qv

e. scanf ( ) T.I.r.r{ <KqK om cqmm fuirq< T5K {Ft qqq


er?l.q
"ffirg erflR"{ \ryrf,{ rg. erF qtq frft <Tft'{ {c{r qo{ftat cqerEl qrGr Beitq'ftT :ilT cmr
I

ET | ffisFt-

int Mark 1.2) [3]= {30, 54, 65,

41

, 28, l-5}

frq wnrqfw< Mark eTl[-T{ qGF Sennrq< q-{ fr'ftRE Tr{ cqqFil qmrMark tOl [0]= 30
Mark tOl [1]= 54
Mark tOl [2]= 65
Mark 11] [1]= 28
Mark t1l l2l= 15
Mark t1l [0)= 47
sr{ qfff qmmfsrc< ffio \n"JT6f,{ qffi qrcs b"fmn w TlT fi,ftfi c<.I T}ffi
E?F{ {hfrtro ffi-r qtTc<-?r Ee 4R-{ q-q]'qlEtql frAr <qff{ Tr{r qr:ilfr-s wTr{ B"llqtff{
i{,frr"K rs sffi qil6{ Grrq-lrffi q-{I qrdllritstrr lt+ frftcq srr qr I cq'T{int Mark l2l t3l= {
{30, 54, 65}, /*comma must*/
{47, 28, 15} /*no comma for last row*/
);
r

B'rr*v{qfr+{q qfuTlra qslr<\e- cqrffrffs


int Mark 121 [3]= {
{30, 54, 55},
{47 , 28, 15} };

Tl{.

qlrq fr{c{ qef\ q|Efqlsfr{


wlr-T{ qffi qin< B{fqrffi Tl+ e1q1q 6q{ T}{T q<R efrsRr{{ wfs$ c<ft affrs I Tl{Gt fiTcr{ cFFu'<iFocq-{ q{r ,{Tt $emrffi fr&{ ntq fi{Rs qrc'
qfm I q q-{r {t<l<qs Rs tlff{ s-ll'ffi{
"fqfr \r{Ft Tfl qr I \r{ @<T R{ {w{ wli ${rats
q<R.
q
q-{r
eFl{
{Kr{is wtT s"lmm{ R csFr rltrK q-ff scanf ( )rFl\.|{
frqT frs{ ECTlqt I
<rKqir 3i1s 6{pffi fi{ftE3 c:IT qFilqlgr{ qGm ffi-s qfirtr{ S"nqfdK rfl{ frf<.f EfrF{t \{frr
qqRr*

ffi's

<lq{frs

cetFf|q

# gy a )

caHNfirt
q{Fff{ t
#include<stdio

ccrrs

ro {{s

qT\olT qo

qq{r{{ s-{i

h>

#include<conio . h>

#define Row 10
#define Co1 10
main
t

()

int r, ci
int mu1 [Row] [Co1J ;
printf ( x \L\t=====================\nr ) ;
printf ("\I\TMULTIPLICATION TABLE\n

\bc

");

ffi-r

qrrtr <r{qlT <Frir ,s<iF

s{f

\e cTFl|rqH

er{F

printf ("\t\t==--=================\y1 ");


for (int i= 1' j<=Co1; j++)
printf ("84d", j);
,n\-

^-:-! f rrLr
yr

-------n\.

(o===*============\ntr)
printf
f or (int i= 0; i-<Row; i++1
{

r=

i +1

printf ("82d I ", r);


for (int j= 1; j<= Co1;

j++)

mul Ii] [j] = r*c;


printf ('*4d', mu1 [i]

I);

)
)

tj

princf ("\n"I;
getch ( ) ;

cqpnrF <tqc-*rq frru'K T-.qlqE qqf{E qm

MULTIPLICATION TABLE

3
4

2
3
4
t

6
7

6
7

I
I

I
I

10

10

234
468
6912
81216
10
12
14
16
18
20

co

15
18
21
24
27
30

20
24
28
32
36
40

10
15
20
25
30
35
40
45
50

'12
18

21
30
36
42
48
54
60

78
16
21
28
35
42
49
58
83
70.

16
21
32
40
48

58
64
72
80

910
18
27
36
45
54
63
72
81
90

20
30
40
50
60

70
80

90
100

<Eflfrc qllrd (M u lti-D imens ioa I Array)


fr re'-tttdT ffia \Trfr<{ 6ETT :F TrqI frFFr cqqq, ffio, ryd $nro ryfr'vttinr <l=rqF
\{-{6flq-{ <rr{ I qff{ wrTr{Cs' $ O vrotko clfr, qrT QvTe qerd q?F'<l qaft{ r{FFt (TlEf)
q fin{;f
all$.ca- oitr{t qfielBss-il{ffiRFEqtfriiFTE$fr<r\$|r{<6TIETt<rg\orEilfrr,rsTffi
qilr{ <r{$r riil qr I 6{:t6[, ?c'dr, elq s tEg,r ftffi 6<rr{ Tir qFs{ fi{r{T q,{t frNfu{t qtfGt
<KqlTcrl c{[s "tr< rFExqltrcq{lfrm!rylGrdEqt{ffI cq'ilf ErErt-

int data-cube 12) t4l t5l;


int iomp ,shikkha [2] t3l t4l [5];
q-{.il

ffi-r

ffiT

qrF

<qrtfrro q$r<r r eqqt Erffiofi


qrf6{ V{qlT G{t Tl{ t \5r{ qfi,{ qtlGr frrqct <'-dt .{<i? qftq q<\
\crtrds

qbs

fr

qilcr qrrqlrrd fuc{ reIIfrT


CeNtfr{ qrq;r <rj?rqlT

F{

fr cqwfr(

C.q.)g TlRtFf

frvrqlTTrsr{ qRfifu
fi cefFFrffi qFrlg{ qFp,tf frT{ @ +-|Rrr{ r et cEHfF main( ) qnx erF iBqm-reqFs sR{{
fis[q {f cqFfi{ frfir{d e-+rg "w\frnelr{ ffio ES q<R. ERfqtrt eo <l eotfrs rRfi TdT iF[ir
{q cqF$6$r vr< dtrr+ main( ) rFIR'ln-?r:r({r cqlllqs; scr c{csFGI main( ) s.R.rrdK \Tl$.lT q\'
(Function).

Tg ers. "tti::r 6q, \Ttrro q{T vT c{pmfm{

ffi

qqR$ qs

tr<ms
cq"ff q-r I T-Fr cEFItc' cfrs

qt s

cErtfrn-?r

dffiT{q

qr rf ealfr{r s'fw qrsl6{


TclI rsh Tqs qr, q<t cEFfl{tRrt TFFTIT
qlq
q(r.t
qfE
qr
srffi{r
fue rf,
Rfu
frss rc{ Tq(q'w,ttcr l {ts ffi I qrs cEHfcr
yrcfd rlElf \ftirsl(tlf.RFT ailT r qFcFrqio esfr fiffi alrqiT q-qt erF F'RIl;r <'?rqq qs ,s<( qfiq
1'rS.?r q$,ar{frs TR:l{ <r{qs qr
I

6$ffi

fr ceFttrr slrr 6rFr fiFE rM wtlqffi

q-{t +s's6qt
6sFr qf6q,q+F Fr rr{r rF[t En
qfief
qs
vsrvfr<F TlrrFr
Tt ertks FR.Irdir cnB I rFlvFr 66a6 qqq B"nT
cEFtfT
q!fi $l$r1T Trc{ir C{CT ,SF ffilgf qcl5r T{-ft '0' qlEO, et eRT ffiftd Trrtl v[rSF ftq ql{-Cq "frrit
qnn frq fi\e qFFre {ra r effi sR.ftr{ erF TlT clfrs, c{
fiT s Fqt4T TlRrl{rs q-{lF
<ql q{ r q&F

ffi

<IGT

fi{rq{ q:wg s,,4fe-4-?r rF1;1 Cs1-4 p1\$r s6T eflT \r-q6 {E 6qFIIFK q1w qfu c{crtr 1:
TRrr6{ ffiq rp e.cr q<!. fidrq crraq {q FR.rn Es-ilr6{ t{'<F "l<-<q qltq c?rtrF fr{R nfrm <m
sin qt qfurilT qGR-6 frRbf qrr <rs Es r i*t cqF c{'Fr cefFtttrd q-{r rrftrtircts w\'t{ <rrqF Rr
{T;rf r fr cefWcq 1JqE:[ main ( I "rfm enF Wq.K-eaRs nR.t;r cttca st CqHl{ fi{6qs sFrs
tr*Rfrw'n-s FRfu qr qq( Ecflq[{ qr <I eotko rRfi frTq"f sGr I cffir cEFftrq 5q-aq qaFt
main ( ) Tt('lT all{,F effr{ q{\ ,{t TR.l{ qM qqt R 6iFFr rFt(.lT Tw{lT e[crfs;r rq r-{t TEr
prn fi q <Frqs' T'fRrl;r+gqro qqn RtF qc'r vl'f T{t Ercelpffi

).
t.

q(fi

(Library Function) qqt


tBv.t<-ffilrvtR.f{ (User Defined
ETliKfr

Function)

qqqRrrfiT
fr ry6a* frqr${ sFKfr TR.rt q|crd ReT ft+t{ R'f{qq EIffir fi-q-{ TT{IB w{$ft main
O rflR'nn qr{qK sift Tls t printf O, scanf O, getch O, getchar O ,{ $16{-{ Effi TR'itrif
EqRa.t r q(qr rc$"sFr <t?rqF q.qr6 EqT {drt qrfiFrt ql qrrcq I uflEI(R v-R'rr <l-{ql<
w,fstw rrqq., .qq6n c{E A rflR.FK <t-qqf<Rm q<R, F{flrF q|{rqt urq r q|QKR FtgFIlrqR
@ffimt{ \urd cqsEr rtRq <fu qrs I qq{r fr++ ceFtrtn 6{Fr qqqR rtRfi qFrqK Frq
csffiT qtqlnr :Ttb cqgR qRar qq{q :nrclr qT I qrg"
aeFilclm En'csE #inctude ffi
s-{RqK cq{w RsK slts TT cEFffr:m q(-f frnT TrE riqr om r qttefr TI\.FKT frStq vR.rfls
iFTf

qT

cFilR( # 8b s 6sl{ qq?ftr qt\r fi'ft.ra qqj' pow ( ) 4iCR


qT[FflT

#include<stdio . h>
#inqlude<conio . h>
l*includecmath. h>
main( )
{

int x,y;

fi(fi

<rr{r

o'rd

eTF

cElotl{

fr{

Eqt s crFnlmrf

Iong z;
printf("Enter
scanf ( "8d", ax)

q{F

the Value of base(x) :");


;

printf("Enter the Value of power(y) i");


scanf("8d".ay);
z=pow (x,

y)

printf("the

result of x t.o t'he power y is td\n",2);

setch ( ) ;
)

Output

Enter the value of base(x) : 2


Enter the value of power(y) : 5
The result of x to the power y is : 32

Eggilr_

TR.F[

ffi

q'ss main ( ) st(Itffi


cqwrl{ cEFflTK qT fu-r E[rlq-{ ,s<( Et q-$tft m wFE TF\.r{
qs
<Kqlr s'r{{ cqerElro t3qK-ffis <f <I{qr<-s|fr <ffio nr.n Tfi
I iEqK-frts rFlR.l{
qffi-qTe s qffirm wf qr( rT{t{ftr-< cftRtr{ B"K fi\ir rrg I qrF frffi ons< q-$ G{ e{

fr

<irw s'lRrf{srtrf 4liF q<( <fdT fr{ frn qcg' 4tm r vli'.icq-{ qF[crcf q<( <{4K wr
frca erq-{ cEFff+|-rtr{ qsq q'pri6 6{fiqB {k$ efi\erf qm I tBq.m-ffis rp.|\.r6m qlT qrF
qtrsffiflrf{ | {qfi( qf@frT.lqlT TlTsrrt{ fiTT q-{qft fiR.|-ff{ R csFr kq TlT 6!mt crF
cqlEfl{l3r

ov'o

{tr< t Erq qtn-s3rccK Tr{r{fr qK <r{qK q*|c6 {K"ff

Tr$ffi{RFv{B'frnT
fr c$qnq csF qliKR 6'qqf tBqlsr

,n\s-TI Tts

ffis

wE

cqBt? B.eT

sR'|;r <I{{r ssrF c't6E cKErcts fiX frRv


qerEtmT-t\-trffiSetFTf{qtq$f
frroqro-acoqr I
TEf qs t{RII). alq'i{ <"{Tf (Function Definition)
e.. :FR'l+qq (Function Call)

D.KF

ftw

e. T-lR.l{ c$6Ftt{ (Function Prototype)


8" T1\'lrmffiF{Ett"t

P1g1q

ffi

.g

fibF(

6fffi

(Function's Return Type and Return Statement)

(Function Definition)

qf4l relqlrw E{F'Rr<DI'Rqs r qrs r-lR.l{ <&E <qT qs I


qt(rf6T re*ntqmro
Tqro Fl\.|{ T{Tr{
q,,ftrs cqrl q{ cq, fi fr' om n;rm q<( fr-wT s<-cr I erF EBqm-ffio sR.t{ ossrEt
csirvn frrlcf6s" qs I Tfflqr ftq <je@T qvt TR*rq;r qGF dffi cqfrrorq-{ qKt c.tr q-r
qsflT-ffiv $\.1rffi <{qr E"K <i{qtffift RT main ( ) en'ir.r* b"n< fi\Tr frTr qnT: fu e-srf,
r

m r tBqfs

ffis

T.lR-f{ Cslrrofl<

q-fljfi qrqf-

ReturnTylpe FunctionName (Argrmentlist

/ / FunctionBody
/ / Retu::nstatenent (Depends on ReturnType)
)

q{|tr{, ReturnType cr c$|+ k{ cubf bftt FunctionName <Fr{l;rflfr fiFr cmT Tlvlrffi TF q<(
Argumentlist Flvlrq <rTq\5 q"Qmrtr{ qFr$f I FunctionBody-Cs Tl$r;K ffis <{ql an'6s
FunctionBody-Cr:Fr <{ E,f TIR'|ff{ {iffi q{\ qT{tFr S"n ftfn Orn I Ers'.F, T.t\.lC5K qqT T{fr{
Tr$- c$f{ csfrrrr6T cslR.fi s-$ qcE vRF qlTarT+ NfrcTqE {qI qr r fr++ cEFflii{ T'lR.fr{ col{
qRQrrs 6sfic{-<-_q il atrs'rE \flTerrrF Etfr-sl_T void c{"It qt vr{ fr++ o-tttqtr< g.f <l{iqTq'-s
r

qbb

fr cerpnfr(
TTi r FRITFT qN eFF qrtcv;ft+]nrE; {s.3I \ilteffis.lilT qlrr<trrrK frTTlT{tfr FR ftrK C{ rfiFr
?sv qlq <r<RK ?F<tI crrs {tm r q< <lvqlrqft plvffi q?Ft {ks q,n mn rgfrrnq qf
qRrsfrTlnr
Brrqsr

int

q1E6q

ffi

qINr

coF[

FR.r{ <F-qR

T-?n

q-rr

qI

Sum

/ / ....

ret,urn

(0 ) ;

void main (

/ / ....
)

int

Sum

{'
/ / ....

(int, int)

return (0);
)

cEHfcr <r?rqs 4Elgfr FmTq6{d <fqt qrfit? cqura qrtre qfu qr{qR rq 6?rHnir
s-Fcst qrftq main ( ) qr "!r{ # inctude
6fBcn+d ctqKr e
TR.r{ c\etb 6w.K

fr++

qttqcR{gcmsqr

qtffi

ffis

Tt(rH lFf (Fu nction Ca ll)


T{{ qnfi T'tvtT q9l3r r{16r rR-nro qr{{t? T-Gtr, sfi vrcc <r+qrrorfl <t IF sl\fi q<\, cq sl$Fr
<r{qR cft q{ sfts <t?rqs <f w rR"rr r{t ET r qT et qfu$T qn vn n FT rs!ffr{ E<fi
TlvlriK CICaI q'r{ qiF <t ,{slk<r rl\fi c\{s <ril q$ | IFlRfi St qr 6.fR mfrRrFr{ (;) {rrr rf
cc'c{{tlt{l3r c{,{F T.R.t{@t
main ( ) rpti.rr;m qrqlr{rt qfit qr <I q<ilkf qlffi R<r QBqlT-ffi{5 FlRfi ?rrrr ilErl Tr* sl
.q=trfl-q qs sI eFl'l{o qlffi
Rsf qEqlT-ffis TIR-I-{ acT s<Ics "ttGr
,ss|r{ &s{i 6{, main ( ) qrF QEsflT-ffis FR'rq qrq c;r cs.|q -ffi,s eRnT ,4t
r

ql 1 fr T'o41fu6 main ( qmq51i qE'v|T slrR <T Drdr<r Tl(.Fi


I
Rcc6{ uf.rr
<tl3t <F-qs q-{FU" TI(.|{ FI <trd t crFr sRr,Fr (atlffi <t RBwlr-ffis)
<raK rp'g{rfi qgfiFunctionName (paramelre or Argument List);
qafr\ sR'fffid {ftT{ 6rrc{ enm qsfr{ '( .nrfi qirsrFrbrc*n
flTrrq (qfr .Ittrt) TRrr{ <'ET C$ qr I
)'
rF[sl-{m

int.

sdT T-<t(e

Sum

"ttrd

//

return (0);
)

void main (

/ / ....

Sum();
)

lbb

E"f s 6ql'ffRl{ qnfu


<IT{fr$
qceTrsl{
:ITFTIT

cetFllq

# at c )

fiqa

(cics' n

"r{s c(?mqTcq( <uf lsquare)

{astnn<qFr>nftw'coo

C<31

<

1T

s-$ esft

CEF1IT

frrt

rn

#include<stdio..h>
-#include<conio.h>
int square (inE) ;
int maino
{

int x, n;
printf ("EnLer total
scanf ( "8d", &n)

number

(maximum

500) of value you want to square :");

for (x=1; x<=n; x++ )


printf ( "8d ",square(x)
prinLf("\n");

set.ch ( ) ;
return 0;
)

/,/ Defining square function


int sguare(int
{

return

Y)

Y*Y;

Output g
Enter total number of value you want to square :20
1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400

a:*t|ae|T T1F{ mFr I'l(.14 S6I Tr{

^s-{l-{

$Tlrs TT Gi<qm-oal 4](.In TlRfi

p5e1-s

c6-s

({|rs ffif( qil@-{ <cTt E$) q{t c<r?t s- T-R'fcffi q*frT '|{ilN'{ qrg efrsrwfts
qItE'{qrlTF[t
TFiq;{ ReF-s"Gr I *noq6"'T flnfrKftqqAft ffiqs 6q<lrc{:nqfuq o9bl e<(
Brsw{ Tr* t{str vlir
qs I cs8"K s +-f(.i6aT j:t'ci c.I6rl $1q 6e6q ry1 li1({rdm m{:n*
ilfuq \er'<tm r +-o vrvrrq un *ro fibr{ cfftTt alfrs Er< cE fiFF( silE {q slR'fn <I?rqs

dffi<

qI|-@-{

qrt

flR.Fr c$rtFtQ'pt

(F u

nction

rototype)

qfr ANSI fr s fr'+1 qr sEr r"rGrlrsr


qf{:nE.
cd{ Qtq'K-ffis TR'l{ TEI TI
T]\-t{- {ar{K qret T.l<.r+ cqf6FR{ q={fu r fr cqwrcq
qrdrs q:m W <1
<KqK s-{K q-{r <i-{ql-4-o1fr KI main ( ) T11-16q-{ S"fr< iet <{qf re-<t -qT I Rg.
;"R* ..1a"*- (v.GI qfi'l q{qT s t w-< qs qf t reEpf qF <lTqf<-sfft <f main ( ) Tl$f6{r T{qt
qrrro {GI eprl3i \q'F ycq-{ sslT+f qllco r iryffi* il<q<olft $R'llT{^'Irf <ffio efr"f T'R'l{ CSI{FT
qr, rlcs' sct TlR.l]ffit qlnFfreH "fls r eq-{'fr cEFtfc{ CsF ?FqK-ffis
vT"+lT Rcqtq ffis
q<( slR'llF{ fur qR<tq-{-s ql({ <f{t Til qT I
F11-tq main ( ) rFtR.t16K 6"f63 cqls"tl F-{f qs
fl\.ir+* qs'i mFqlroT]\.1{ CqntsFltot<6nqTrTqcl-sacHKq cs1{ oe-fr[sfr ml{cfBrq{nef I
enRFi{
lll"tn 1 ) 41(-tCT{ B"rC< corq tEsflT-ffis flR-rrfi <6f{ cfr$cE TIRfi C$6F1R{ CSrfiT
q{Tt iT-"flta1ATR-t{<d{Kw<itetq.t+ cqfttfitt 1tTI rlr lF1Rfi c$dFR{ <IflR'F cqfs"flT

rfl(-t{ cERttrtt"i

IFfi* A * W fi'e< ml.t q$

q"{ I

+-<rynD qcq.r-

ReturnT}pe FunctionName (Parameter or Argument List)


\bo

fr cqrflfrq
BcTqfi
int
int
int
int

Sum (int, int) ;


Sum (int, Valuel, int Value2)
Sum O ;
Squarelt (int x) ;
I

ffi

tfu{-ffis

fr

ceHfrr c<rn
(qHftfir r6rlT'rq cs]T

aetFtlfiR

T{F{iT

rR.fffr

<cfu <I{qt{-s|ft T[ main


"ll"fF.r asqt r firua cqHmF ETrfu-

# co e rR*tq <rEqK ors erF r4rq-s "I{ wrarr< +nB.Rrn

( ) TtR.in"< frcF gtF,.{ Tsrms

ffi

o-cn eFfr cEwr fr{r

*include<stdio . h>
#includecconio . h>
int fact,(1ong n) ;
main ( |
{

long num, f;
printf ( "EnEer a number ;

");

scanf ( " gld" , &num) ;


f=fact, (num) ;
printf ( "The fact,orial is 81d',, f ) ;

getchO;
)
{

int fact.(1ong

n)

if (n==Q)
return L;
else

return(n*fact (n-1)

It,***u c*,ear", rr{ T:r6ry g{,o'r cq{t T*u

Enteranumber:3
The factorial is 6

rFf(fi cqtBfitcqir \{rfl{F

eryt{ ?<fi?i qcq qdms (Argument) c(r-fffi o-st r qetR,


qNirv$roqRnq{ T<Tr tRqssrst 1 6qrn- sqrtrmsliFrqtKftTR-F{ft.-tffis.lTqr6rqrBrqEar
sFI<Kl crrs flGt t sfrrg math.h ,{ TRIT cEttBfit'i double qldrirfirs$ffivfr-Efir{-tscr qq(
T-I(rt{ s-<H\e qfi-s-wq FIsf Fil-6{, 55l6rEE fin-miprintf ( "*.3f\n", sqrt
E-s

(4) ) ;

cEffiF sqrt(4) ro q$<5efm Ery'rtTn s'rg q<\ srtd rt :rt;r 2.ooo Qt or< r {t;tF sqrt q

{ftmT qfc{ tffiq1T stlq 4 (a

siE 4.0 q m"flsfrs rr(sT-f(rt-{ cEfrDfit{ F.'ttqtTC-<F


g.'l,E T?flrrRlstr{ T-t(rr{ CElfiufteK c1i1-4frDr< afuR
qN{rTs
C{
qlref cq.Fqq qf'FI TGr Tt cq rr<5-{ \Tt61n-t sjfdTlR{q5'6aps
"5Q <en<+DtctmerlsRs<l.in\5 qtrr
q-*l-{cf
fr smn cqlcrfrf{ fi'sr sE{ cFsqr{
Tt TrrI q6{ ,4t s"fls'6{ RE T-qlT-q \TFrF "ffrr r r<plq
sFs cuBr qr{r+ eEtt eo btQq car<n \ffir Btr"i
$ilii qfrFRf cEtmfrfq fi-rl or*c
fr6{q q4q FCr I CTqiHs

double

ri?F-q

qfiffiq54$69"t

-*ry

em{r

qTfi 6BrF "flt cq, rsl+ T<r{ cvfi qfanq efVF int'rl\ft:rq'cs doubb e
fiflsRe Ecsrq r Tqs tFqR btt"i c<ro qq tfrsi< bfrra 6"ttsrnr rc6T Tt{ qffi\o qro "Jrcr
b"rcil{ sqrt Bqrq3"| cerrs

a.b)

\5etl

s cqFlRRH E{F

<ta{sfft qg6q.t6{'sr(fr{qn c{lrrFl*fiRTon3Errtrts-{tq-T

fiovrutkowfibrtc"rs${

TR.F[ cqtd$RqfiXRFF {Rn qrl{TIK. vt$tq cqnAFR"f flVim{ fitsf-(bftc"fs <rpflrK $BItiFt{lT wfu +r<
. qtdr:rfi e<( 4ltofrtrffi ilt"i cvfrr-q.n qK {Fr-rst{ fiur <RF seilsir qTryfl{ q<(
r

Ee-Kq{ efsf.t s-{ro rlR.l{ c$dfit{ re*ntqrsro {qF-',-t s'GI


T.l\rfcr{ \fl6(Ir8 e<R. 6$Rs qimrfrtr< q$ <?Fq qI qcE sr< qfrr<q{ er$Ff 3EF TlRfi
celdfii{ T'qlQ-{?rro qq.r rr< cslrl
I

Tt\.frqaffifftl?t sfiEI{6fiffi

fr

cqWnn main

(Function's Return Type and Return Statement)

ffir{

( ) T.R'r{ Tq EGfr qsflK-ffis s]\{r{ qtnnF(

ffi

c<Fl"t

kq

65br

fitc"rs erFrlq cs<s "fl5trntKr+rofift(bR"rE'rg{qto-<rEsrqqnnF<F-csTr<F esF intfit"f


{|T ffi T,<r{ TcE {r{'ff{t q{ r sr< main ( ) flr.r+qq c{ col{ WqK-ffis R-frfi ffitt( fitq
<tBq r(ce uttcq sn fifiri ilirqn qF void AvrNt Fcn'.l cs {s I void fitBt'( btt"t frffi 661-4
rFt(.t{ q"mnB( FKSrrs cstq sjE fift{ re<-cs qrm qt TcE wr cFr r]R.lffi{ tflft&s rr dfu-s
qq|rfffr{ csRcs<rm ns <l-{qf{ s-<t Ttr ?r[ I \rr<, main ( ) Tt q-di coFt Effi{-ffis rflR.fcqlf
fibr,{ Dftt void qlu,t q$ ml;r Frtc"r< qrE A rflR'l{6T <i<qt<+tfr sl\'lffi{ tftO-o a1 ffifu$
q'imr.frr ert ARTK csfiTR-<rET {s <rq{T tr-{f {tT r qrq'6dr, & w-r*re q-{Rt fibtz( cfiffi*

ffi6 <F-{cu qr<


ffif.( Dft"t void ;l.rt er{ tGg:.t{-ffis
qr$lT sq{@ qr+

dffi

Tr{$r qI s-<-!q r-'nQflT


+R-frq csl{ ffiF(
I vc< "Function should have a return
Ctq13.ls CEHTT s"41t6Efidftq CSI{ EE <f6 fi=||T
qffErqqt
(
qlq
q-sd
+-R.fdrc <]<qK-dft qR.fff{ ffifr-q aI
<f-fi cq"[{ r fi?t
+
vatue" qffi esF
d&-s q"itm.rm:TFtlitcf gRra-<rq< $5 <JTqK T-{t TR-{ {'t I T*{lt{Fr r- TlR.-lr^K 6rEq ffir(
6sffi c"|-6q c{t T.tc.tfl{ s.fq ct{ a({ 3rqqk-rtft fl\.fcq frr* qfs r QEqt<-ffin slVtrq ffifd

dffi

<rE{tlT{

p*<rwnB

qcct-

ReturnTlpe runction (
i

/ / .....
return Returnvalue;

/ / oY,
return (ReturnValue);
]

q{tn, ffiF( qt{

(ReturnVatue) +R-lr+s frEF( fitTqR (ReturnType) qrcrr

c-"tfu

coF $q
6{:Fr, intfrltf3tt{-ftfi?dR.trffiRtsF(Tr{qcqf 0, 1, 10,
rrnmfloatfibr(fitor-RFt?
:FlR.irqT fiBt{ qr{. qcEt 3.s, 0.2, 510.6, 130.125
r void Rqf q=r c{ 6q-4 ffi(ffici-frffi
csFr rl\.1{ {fr <j<-{k-stft n'Rrirr qftfts.4 ffifuT q"Irg{r{ ctqt{"f con csfrTr<rqg E\o<KqF ql
sc-?r c$<6r @r <F-{I q{ sr< sl{t c{ co|q fitsFi Tr6q{ s1-{] est T-qlT-q {tTI TFr r rol{ sj'E <l Tlq
qsF cEHNi+rD Ei'<r6-sqFrr
fiDrio-*mqrlfrffi
#include<s tdio . h>
#include<conio. h>
int. func(void) ;
int main(void)

ffi

ffi<cr-{Rr

int

num;

num=func ( ) ;
printf ( " 8d" , num)

tooffi

aba

fr

cEEnR.

getchO;
return 0;
)

int func (void)

return

10;

qQ cemtfd{ cotssrElTlqo-<rqvEiqq
cq{tTtm

10

qFtqlR's cqH|It #co ersFr,c(qlT <d'lsquare)


c{ir
eTE cqEflTfraf
mFrf{ r

<5<ilT

q,en

,{afirc ffi

csffi

q{qK

iF.cir

#include<s tdio . h>


#include<conio. h>

int get_sgr(void);
main
{

()

int sqr;

sqr=get_sqr ( ) ;

printf("Square of the number j-s td",sqr);


get.ch ( ) ;
refurn 0;
)
{

int get_sqr(void)

int

num,.

printf (t'Enter a number : ");


scanf ( ,'*do , &num) ;
return num*numl
)

Sample Output:
Enter a number :4
Square of the number is 16
)

v-EqtR-ootm-s

11T{

fi cemn tsR rs rr{ sirrir q-dj'm qmrq* s*fllnr{ \$[q r E-rq EfrEdq. qfr-ffr ]rqq\sfrr fr
6gFtl{ ?sR q<R

fi<tq

cil{ q{r

ueF eas14 cqHlT {6{t Bloodshed qr boR rev fr++


loev
qu{r{ls r-fi srs r efi{ fubrfi{
{Q qqq r frt, cw a *oq,u
TGr cEFllTffi \3 Tf{c1ls {t"F{q cq{mtq[il
fff-! : cw fr++ (Dev c++) DlE s-{t I (Tfr tflF{ TalTl etfrs Erq5q eFffi{ tq!+{ Tinv {trr 1)
E,r

c++) r qtr {qrqt

tffi

6ak<F

{Ff-q: ffi66sffi1631
{FI-e' offibnn rT(TsF6l s-dl

t{Ff-8 :

cqFwspfltqsil

{1"1-C r

cqF$T<Ftoiil

Etrglq qRr<r.I cw fr++

cil

qcdT

T.ksr g"ffi

DlE <Kr q6E firo-{ Et6sT 6q$ TIr< r

EtrsT qsfrs qfor{

Q,b\t

et

q,TqEi

rip of the day E{5q a6

s?r s

Wfi: 'i:ii$u
t,:til

i\ ffi

'tl

tit::
'.

c{Fnr{tFf

E{fu

t* .*""''v ,,'*..;: l4 'iii S,lqi

?'.S ,, lj Hu*

fflnsert STossb ffi

t#

Gao

Tip of the daY

...uou can lun)indent a set ol lim by selacting


th-em and clickinq on "Edit / [Ljn)lnden$?

gfl

comoirer

l@
Line i n9-.

i i :l iD-pdi {iiC6t-.iipi.3ii}"{iffi

qt lfg;t cetca File 6n-{cs. New ,{< \tr6lg Source File fr6E7'T-{rEt Untitledl Tfc:r mfs f,ffnT
tT((Fl
w*'r uE qr{ I qt rsrs cq{K trglcg, (EHIIT{ r<fle fr{cs qr{ I c{tlv fr{r q{r{ clHFE
s?ffs qtrq l CEtEgq q(Ts.cl Clt3t Ctrl \3 F9
fi es'rE 6u-rofTr{s-fiqs r F9 ftnqrq

ft

,ST,rq (D'C"f eFrs, F,

cqrilnF

ffi

s-{lT

qT 1 9s8q3[ Ctrl
"fltq STf

'lstrFrlqrq

16
t'51113l&

Dev-c**d.9,9.2

i5ie
?rl-;g*;=* --F:it-,rg-:+g*,--ss*-:i*-*erl:s]*-::::,-*-i:
,"$6-iilqn Wlfl g; +v{D ' S g tn '6* , {]tr ''S
lri n m'"4, ? @ j ljNil'iijln'st rossb ffi od"
'
Proerm-2rm !.

rl*:lJ
i S$ c"'w"

i ri*

!fr n"*rr.ldft c"rdrrr"sll

F*e

oeu,islE[

nrtnerrtrlS cloel

Merage

\b8

\9

Flo

fr cqwfrr

.tT{l

eRe?.

ensdaqN
dfrtTl+ Rq efsu RtflT s-$ esfi

cqH1.q boR

cl-N

q54

ercqGrgcqTl
qf{$fiiT qrTrsrftr sqT cqHRr{
cEfqatrrq i{Fr{ fr{T st-{{tr{ frrq< T6{ frq qss <5irtrr
cqEgr q<ql<-orft dFttTrq

T{F

fr.6{,

FffiDF

ETg \e-cet{

&frcE

qlq,dTrffdcr
dfrc+.n ,ff{$rqr qqi

es q{qffr R+kr cbfiral{ frq qmr{lK q-qi esB cewT ?e-R

*****************************Telephone

Name:?
Address: ?
Type

Bill**********r*******r************

Date: ?
Tel.

Minuites

Local
NWD
Foreign

Rate

1.50
3.50
6.00

?
?

No:?

TotalTK.
?
?
?

Monthly Rent

80.00

Vat

\rrano I olat

TsrytRcrsf
6Fr{
frrs<<

Rcq-{ ETF

sFrctrl {frsr Tr6E filn srr{ c{, cEptk{'FRfrFtg fiqlc{q

tq$

(input)

qmpq{q:

1. Full Name of the customer.


2. Customer's Address.
3. Month for which bill is issued
4. Telephone No. of the customer,
5. Minutes for Local call(minlocal).
6. Minutes for NWD call(minnwd).
7. Minutes for Foreign call (minisd)
B. Localcall rate (ratelocal).
9. NWD call rate (ratenwd).
10. Foreign callrate (rateisd).
11. Monthly rent.

v@prqq'
dfrrfi{

fuE-{ R-$F s.|qsTr{ afupl qssq 6ay4l {r<r cr, q+fr6s gqril
tq$effi qrsJv rotat
Taka for local call (tlocal), Total Taka for NWD call (tnwd), Total Taka for Foreign call (tisd),

WIs

sub rotal (stotal), Value Added rax (vat) iR Grand rotat raka (gtotat) Rq< n-sco qrE

tbc

\oq|r\B 6p66qFf

q{fu

w,l{wrft:
TotalTaka for localcall (tlocal) =minlocalX ratelocal;
TotalTaka for NWD call(tnwd)=6innwd X ratenwd;
TotalTaka for Foreign call (tisd)=6inisd X rateisd;
Sub Total (stotal)=11s6al+tnwd+tisd+monthlyrent;
Value Added Tax (vat)=stotalX .15;
Grand Total Taka (gtotal;=s1e1al+vat;

cetFflqffiq:
cetFflq

ffiT.Tr

q-{T et?kr

qtffifRqr

\[T$ft .qrctr ffib15?gR GTTE


tfq {r{$ "Nerlqlc<

?sR orco ErE I et

w"mflRq{

CEH1T TTFrc"6

qflqg'llfriar3

!I

frFqrs
e.

ql*flrffi

ot$T15g{qlT, Es'Frl, ISF1{it-?r, Tlcc-?rTlTtsnfrt{"tD


<FT

t*Sftro<<

Local, NWD

Foreign

call

qTq
s-{ Fdir rtrs (Local, N^/D

Foreign ."11

:r{6{{ Eit (rate)

t{S ftt

sT ffiFr }I:K (Minutes for call) rel-< (rate) qat s'r{


Local, NWD s Foreign t"11 rTTq{ q-{T TFFSI6{ Total
R6T{T<lsrqrE
Total TK. RcryE o-+*
TK.

ofis-qlqlc<

mftf s-r{ sub Total

sub Totalf,iF o.)c srfi a"t org sin?a qRqFf

Er{I
Tel-{ sub Total T clBf

call q{q

Local, NWD re Foreign call


rFlfq{ q?r (rate)

'K {{slflt

Foreign

Trrs[<)

q(<l
8

r{Fr, ff-ot vt, rqrq

qrrrrdrt{lgnfr

T;IE[ q:EI (Local, NWD

Trslr

qq-<,

6<-q

r{Gs

Total TK. = (Minutes for call) X Rate


Sub Total = Sum ofTotal TK.+Monthly Renl
Vat= (SubTotal) X.15
Grand Total= Sub Total+Vat

E-s'ellt{ {Rfl"t q<\ fr'(tfro

Monthly Rent (TK. 80.00) cTFf a-{cE Grand Total

e$s$sfr{

b I I{{rKg,+-+rqFrGIl'FIqIolTCeqr{
aetFfl{ tr|Dtr
"{c{ cfiEF ffillqrqt

rll{

{[9[trFM (Pseudocode)
1.

Start

2.

lnput Name, Address and Telephone number of the customer


lnput Month
lnput number of minutes for Local, NWD & Foreign calls
Rate for local call = 1.50

3.

4.
5.

sEls-qEr'n\e

e.b\9

fr

cemqR

6. Rate for NWD call= 3.50


7. Rate for Foreign call = 6.00
8. Monthly Rent=8O.00
9. Cost for local call = Minutes * Rate for local call

10. Cost for NWD call = Minutes * Rate for NWD call
11. Cost for foreign call = Minutes " Rate for Foreign call
12. Sub Total = Monthly Rent+Cost for local + NWD + Foreign calls
13. VAT = (Sub Total) X .15
14. Grand 1e131=(Sub Totat+VAT)
15. Print results in the predefined format
i
16. Stop.

6{F[RSTf{qg.pfrTffiryrstfi sffi tq"lb c{cqa q-q srRc{-{q rg a#m eromr."-q frcu.Br$t


SL No

Name of the variables

Data
tvoe

1.

custnanel,custname2,custname3

char

2.
4.
3.

address 1 .address2

char

telnumber

char
char
float
float

11

month
minlocal
minnwd
minisd
ratelocal
ratenwd
rateisd
monthlyrent

float
float

12.

vat

float

13.

tlocal
tnwd
tisd
stotal
gtotal

float
float
float
float

5.
6.
7.
8:
9.

10.

14.
15.

16.
17.

float

float
float

float

e-st qrqt,

'

Description
Full Name of the customer
Customer's Address
Telephone No. of the customer
Month for which bill is issued
Minutes for Localcall
Minutes for NWD call
Minutes for Foreion call
Localcall rate
NWD callrate
Foreiqn callrate
Monthly Rent
Vate Rate
Total Taka for local call
TotalTaka for NWD call
TotalTaka for Foreiqn call
Sub Total in Taka
Grand Total in Taka

Local, NWD Foreign o"11 q{r{{ ri:r (rate) Tf{lTqe <lT{K


$-rFr EcTfq-{ Es qI
g
qT
assignment statement
$rycq cEHlcn ETf{ $RT rrTs r \oTm-{ qal fr{6 float type

er{lT

qt

"iffi

fl{

EilR[T-<tsR ERrq-{Er{ e<R\o-m3r{IT{?tt@1fr ratelocal, ratenwd T( rateisd

fuqF float type qlRcs-<cq* qr{tq{ qr{ qq( \5tcq3r 4]rr Uocat, tnwd e tisd CT{..t
crF ollr{ r et silRrl<urqTq{ ${ qq?F{6
T*tr- crqrrsl q(T nFcrr c{3r r{Gs. q5q
mF bfoK qqT

qry .{sF float type vtfrclr<rffi Ecrrq-{qm q<\ q< Tlq gtotat ffiaI c{ce {Irg
\NIST 6arlTSlrR cq, ,{t qlqnF rNtirltrKq{r mF lqE Variabte qr Er$-siq l
q-{6TF frrur*

Q.bq

sRtt \B mFfnqH

qqfu

q-ffis'Fft:
Totalraka for localcall (tlocal) =minlocalX ratelocal;
TotalTaka for NWD call (tnwd)=pinnwd X ratenwd;
TotalTaka for Foreign call (tisd)=p;nisd X rateisd;
Sub Total (stotal)=tls6al+tnwd+tisd+month lyrent;
Value Added Tax (vat)=stotalX .15;
Grand Total Taka (gtotal)=51s1al+vat;

cqFnTffi-q:

ffi

ffirqr

q-ff q?rc{ wlqr'nfrqr


o-Erq cEFIT q"q66 "ff|1, qR"tT efis$Sl6{
cQEtN

orrs qm et
r

qncTrrilRq{

qTrtfr ,{sF @'ffi tsR

EF

qnErcettRm

of$:rn-<r< q1:{, S-$m[, trsFt nll-?t, Tfrftr

ftpqr<
sE qffir >f:ls (Local, NWD e

ql{ ?pflfr t{$

ersqrm{an, Fotil, rflq


q{RI,

tr

T4-sstrr)

tq$frper{

e I Local, NWD
q6{
8

Foreign

call

qTq

Foreign."11 u{R3aT

(rate)l1tftl9

sq r-dlit

rjt{

(Local, NWD

\9 Foreign

call q{q

tlrre-Rr)

for call) $ET (rate) e{ ora


Local, NWD Foreign ."11 q{fq{ qTI'lRl'sefr<r Total
TK RTSKT<TFEr<
Total TK. iqrry< o'am eK TIEFIT 6{pf ?FGt sub Total
9il'rf qfr{
sub Total(s o.)c srfi qct iF.rit sn6T qR{H c<it lKro

sdT

nftc-?tfi{toTtfr

sitf{

>FRI (Minutes

Local, NWD

Foreign call

qqrq{

(rate}

qtrTr

1r

{el{ Sub Total it clc{ Vw snlBfr qRfi'f q<(fr{Rs


Monthly Rent (TK. 80.00) qqFi fficE Grand Total
eflrg${t6<t

bt

fotal TK. = (Minutes for call) X Rate


3ub Total = Sum ofTotalTK.+Monthly Rent
(Sub TotaD X.15
3rand Total= Sub Total+Vat
"/at=

fr'fiRs q-{fi[ts

TcTlSEt Efefirci qCT

/
cerFnT trtFtr
416"f qi't5.F cqsxlqrfl

sqlrE*t'fl\g

fi:l
WTStfiF,lg (Pseudocode)
Start

lnput Name, Address and Telephone number of the customer


lnput Month
lnput number of minutes for Local; NWD & Foreign calls
Rate for local call = '1.50

a.bb

fr cqlmfin

6ffi\ q{tqtBEF

cEFnr

tEHfFl-{ cofswm'fr rEFfrcr<I{

or<q{t$t{"F

qKT{R o-<rqGno-<rqF-q 6q"ff{Tm

********************************************"Telephone
Name

Bill ****************

Engr. Mujibur Rahman

Date:

Address : 17 lB, Purborajabazar.

2710412a12

Tel.No: 9125787

Type

Minute

Rate

TotalTK.

Local
NWD
Foreign
Monthly Rent

38
4
7

1.50

57.00

3.50
6.00

14.00
42.00

80.00
28.95

VAT

Grand Total

TK.221.95

qIFITF{T
s"rrn-* cEEn{F {< ry{q-vft< B"r{"rq cil qrfi 1 fi6p}-ar eFr<F qr<rg {E-?r sr< ?sfr <tEp
"nrc<
<ffi qr'tf T-{I Tls r cqHmfr Tl{ ffi-m FE|aq rFtrcr ehffo Rn r <66a, liR-ml{ e<!. 6mt{
c+tq cs.lqfiqTq rqrf q<r. mr.m <lft-q
rg
re-cffir q-{r qtqlat qtqTn frGT cB

qtffi

ffi

qr clcet TF qr{ Pro .{<R. qq Fls. q$TtK{ Rql{ | g]t


fr,ft<"isrira I
qq-o-q frv* ctrflq"r fig cqBnqBc+' v]r<rs[ E-dK{ ctl rrrm <cFr rfl-fi o-et {r-T
qRlg''ls

b"rrsrs' cEHIc{

)t

tr

,{ffi ffiy-r {x<itro<nnrersFf Tilirq-{r erF


c\"$f {6&K

cfi

cc"lnro (10 base)


frq-FErK

"fffi

<r

nt

cEHlqbofrT3t-Fq5a

q-{r esF cEHlq ?sR s-{cs <s r qcfe, F cslrfi fiEr


qds
qeK cr cs'ml c{cc (base) fieflsrffi q-{]' qrF cqHrr
rs

s-<trs

\9t

8l

sffi "tfrFK sdrFFE reR< s-{' qaF cqw{ Ffr Gt-6ro q6q
esFftqsrfts<rctTFoq IF s {cffi erlF r<<o-cns-{r'qtE<Kq<orn crqutfroqnF
cqHN?gRo;[Fqrs
er8 qRrim smilft{q frfqFtg filqt{Tfft c{s"r q'l{
EFfrs fiTt:[

s'Fl-6siir

(o) erwro< qstrIF c<\s't?IFFK


("f) {q ffiqrfi {ref T:ffilmr$ <te-qgT g'lst fi'Tf qg | {d 6{s;r lc,oool- lroFr
I

qBqVrqqIF cn?eole
(rr)

sr-{J?fls ao%

fifrscf slotv<q qrs.lo.6p{I6{ scoo/- brot m-$qr

qfuqr ofi?nn* 6\tc{3t dffi

oprcst qt41rfl-?T s*{t

er6

cEWq ?sR

G[6r

{1

nr:r

qffi

\5Sr' Cqpimrreqfu

\r{fiarft

a.e,

<{tffi4$

s.

u'rcqr
ficurBfr"rsF "$ <(E{srffrBqsqNs
Rcw ryfifr<r q{Rr sPEBTf, cEFfrcK q{.| qr"rf fr cqWfiR s"lst r qsst qdq s-{rE et str{
{FftrT qlT {s-{ 1.gC+C qqqmt T{F{f{ s-<I rfr'{ I {o)o qFI ccitrF q\Em-6.1T EF {l$'fi-$ rrme fr
cfFt|l {tbq'F ul{ s-{t qrg(q I s\fi{ftn a.ffi6q-{ Ftsqq et q$ Fm'f ttbr"la r-fiq{
r

;3'

6otqF

fr cqwna ?qilB qrl

s.lqt
(et) r:il-rnsqsT$

(o) Sw. scct

\ r ftuaronBt8q
er

(?t)

q{rrsmr sFl

6;

S"fr<mc<qraf

(o fr er$ csq crqfttstg

("f)

("f)

fr swr con orqFiF'gq'{


foFFfr (eNfl{n3tEr-{tqsiKf|1fue

F) tsqrffi

(a) print()

sl('l{
(of) getch0 {p-'f('l{

(tt) maing T1"\'l{

fi srsl 59Pf Eq.cqK sFIl


q<arefi

({)

scanO

q6

c4'r{ rq6l{

elq'f{

qKrf,ErTdi-{TF-iT ar1

lh CqHw
-.r-{tro

ge.rchO

rrtr*r{ft <KqK Fd(gi

s,tffi

(q}dTf,dK EF-(e <include>

qf{?

(T) printli ) lFi{rFT


('I) getchO +l\rfi

(ti) maing TT('1-4


(tf) scanf0 TlR"Fl

{. wrftEq:t
II

'

fr,fra cenqi:ri-r EiEl -.f,T q{q ESaE4Ft BgE rrils


#inciucie<s tCio. ir>
i*incluCe<conio . h>
main

;l;,.I!?Ti"

Enter the year:");

scanf ( "td",.9year)

i:ll#i:t:]3 i: :"i:$'l;;:i,
;:;:tr("\n
geLchi);

oo==o)

J"::i:R4
Bd -is noL a leap year", yea:-)

(n) 6qI;lS rFR';al'; f+ cqpi,fg<'r5-rdl $l-rsTlRr'F*{?


("f) prirri:f (f I ge:tch ( )T]trf6.I{ lFr,,gf iii'i i
(cl) .S1m-'6 1.q*flrrl? "r-f64r,q4rs j f g6<r."rT<Esrlfiijjs1E1 Firtii frcsr< otsKft{
(q) ff-rirpt :il{itrT it-r'tb ceTr lB;fS t{c-am {c?fl'TgF fufui* wit qsF fr smc cq"i${
.: .": ''
Fi"i r ,:.
r

::

fr cqqrfu

{. qlTR.f 4$

fw e7ur <rFr"r a(a} r+ze pr+fie

erxerenv

qr{t Ees

cssilr v/Eq-

{r",

) I fi cgTqfftR fr? Wlror i, C pragramming?)


t I fr cgHlR smrg ?<FEi' fu I 1wrir, down the characteristics of C programming language.)
e I fr c$flfi\ sl$ fr++ cqlqlfiR gRITI w{r
"ilRf$i ft..I , 1*rr) down the dffirences between c and
I anguages. )
! lryy^ming
8 I rq-m cFI cEF[l
q{'
vl{f
{Et

_TRTqr

I (why c is called the language o/'programmer,s?)

c I fr ffi
4ftgft <-oco fr q<ns ? TIthat is meant by standard ribrary in c programning?)
v I fi cqwR g1{I$ F]\'lrffi rqglT fiQry <-{cu ff n<tIx7 gnat is meant by header
offunction
Jite

programming?)

I fi

in

cqnkq printfO v sqrt0 T-R.H <r{qR s3rco q64 corq cqq{ T.EFE q-s-vg. o-{ro
<q?

(Ilhich

he^ader

files should be included to

use

printf0 and sqrtffinctions in

programm?)

r fr cqH]R qsK tGQq <"{qt o{ r (Des*ibe thn hirtory o7, ororro^^ing ranguage.)
b r fr omm cqHl{ c""ttlfr( q'rtrf fral r (write down ab out the program co mpiling
in c.)
lo t fi w{IT cEFn:r ffiq qqr6ful r (wrrrc down about rhe prog,am debugging-in c.j
:r r fr gFR cqw{ E-d?-{ "iRr{(.f qqrffr{ I ftrtrite down abo,uui program deveropment enyironment inc.)
Eqef fr swrs cqwfr< {frr<trt cqEgr ffi s fidrq o-<n *tl1= q(rm-c"t Tffl; t (Describe
b

the steps ofprogram coding and execution in c program deveropment


environment.)

)a.rfr9m{cEH'lf,IKdfr'sritaq<{-Ero<l(oescriuethebasrcstuuctureofcprogram.)
wqt fr cqwR gl{l-rr cqHrn< 4t{ <'f{[ M l (Describe

the program constructian

programming language.)

)\t r qIFIfr

fr

cgwfrq s'l$ sv. {<rK osbf Drt"i q{af{

qC1?

@ow many data types are supported by

ANSI C programming language?)

58 r

v]ffio

)a I {Rg
)\9

\9

{neHf.rftrsfu fi?

flahat is dynamic initiatization?)

q|;l{ltg qfrsflt-<-{ :r({r efldo^ fr?

integer? )

(wno, is the dffirence berween signed and unsigned

TI[o qsF rFF ostt Bttrr< D-{s ffiFrclf s-{ Tl{

balance

variable called balance with an initial Number 0.0)

)q I loc-counter ifi{s' esF

el<B-

unsigned short qftGflT D-drs 6qlt6fl <r{

{l{

a unsigned short integer variable called loc_counter with an initial Number

)b I DEls <t

Nfr6T{tro1-{

<KqlT

aqE-g6"6

fficTq

)lD

I DEFF<I 69fil1T<tsK

Tt*"

rs

fuT'rc-\e^ft $flTl

o.o t

q1<trq'

{l{

(Dectare a ltoat

)oo

t (Dectare

down rhe rttres

for

naming

(what is meanr by scop and limit of a uaiiobtr.l

rSRr{ cgRtr-<FK rrll {eFsi fu I lWritn down


variabteVfit Efri s q6ffia 66r6s-{ qRT
"lldry fr{
6E1-TIE \3

$;t

l.)

fuq, iri,l,

conyentions and uses ofvariable.)

qo |

of c

the ar6nr:"r"", behueen local and gtobal

Q.)

\e

I dR:sq

5Els

\3

S{rs{

q61i

arfu fr{

I (write down the dffirence between variale and constant.)

de/ined dara type?)

\S I

fil

dnoq rE' ef$l{ s

fr frl

Erel-$Fa Eq-q6"tq <K{R

fu

t gnot is roken? How

many types of token argthery. and what are they? Mentian applications with
examples of each type.)
(s)
r3Ttg <q6s
T{nrf ftlrite is meant by Kelnuord?)

fi

fi

({) fr glRr{ (qrsl{ atr ft srlru-k qN

fr{

r lMentionfive Keywords olc ranguage.)

rlo)

scf s

C{lsfllTltI

q{fu

and Expression? Mention with examples,)

\g r fr vFrF Rfr-g ffiBtfi s 6ffifug fiftBrirdT flefst frlf I ({rite down the dilferences

between

prefrx and postftx notation in C.)

lq{-q1, ++1 \3 l++ qR {Cql

qq I q{lrTr{

.
titdfi
fi?

(what are the dffirences between ++i 6nf,

frt q"ffdf<-* efsl<Cgq-qlmlFql4A

i++l)

I (What is operator? Dr,sclss about the classilications

of operator.)

fu t (writ, down the of dffirent


operator with example.)
a.b r fr omm <l&'nn q"llcnF< <-{cs'fi {$T? .{sF EqFqrqq{ fu t Wna is meant by conditional

qb I fr&{ efol{ qitfr?kxfr-s q"l|m]g"rg sfrq{ Bq'|{{qqq rlqqK


,p

uses

'

Operator in C? I{rite down with an example.)-

eo I cqplft <fsr {t cEuttr 6fitffi8 <-{b ft T$lr? cqHlq dBffi+ sv qq';6 e ft ftl BqIq{6W{
fE{ t @ttot is meant by program statemeit? How many types of program statement are there and what are
they? Itrite down with example..)

e) r fitur qgrEfi
(T)

(Expression) <f

ab
-_;+xY ("f)

qB<lfutffi fr st{T fr{

x3 +2x +1
x+

ca

(uf)y=ax3+bx?+cx+d

-b+
2a

9l I qeff[nBc<-?r q{rr{lg.'f <-6Ks fr mns I fr wvm <r<q-o qfir<?-TQ(qt q{tl"Irq w$rT fr"[
se I Trc$r{tpsr{:rmrro *frTru\dt't{tdrtrsns{srKqsr e<iF cEFfN*

[; =ry]
{.-oi; {L-osl

[u.-ou; fr.-o)i

e8 I csrnf qfr6q-{ osilfoqr ENTGF{ mrb qcqr 6<s-{ frGft{T q,qr ,4sF cEFtN fr'46t {c+r .h
qfr[c< fiT{ c-{vft E6oic-st \of{ ql c{rc-rdm (basic pay) {vfitt co elof q&'qVf sfsf qR.
{ooo blolGftqqteFil efl-q tvr<bTrs[<r<q'Tdr (Te-rFI3t 5o 9{sdq<r{lEs
ec rfr cEHtFR srqm dfi--s {t ERfus oun BR"r Ts ersl'{ s ft ft? tnqrau{ c$sc'i <f* oa
I

(How many basic or primary data types are there in C programming language and what are they? Describe
in brief with examples.)
qGel$T <qF
Frt"t q&TlTlT
om s'GI \5t fqq r Wnot is meant by
r6sFf
T+l-tr?

fR{

sv

ft

6ff

fr

data type modifier? Write down how data type modifier worlc.)

\eC

tqfTtFf

ftf

qfgsf< <IEQfffi qfr$emf

<ft

TT

(tI/hat is Pointer? Destibe the advantages of

using pointer:)

lfr.->o; E[.-o), o8, oV, ob; T.-oq, oC, oq, ob; {1.-o!, o\, 08, og, )o; q.-ou, ou, 5!;
fr.-og, ob; E -o8, ogi {.-o), o9, o!, lol

eb

I s.rE]q dffi ftt fr sFrK as q-<If,R.TrftE dffi

<r{qs'q-r slfi-?r q'-q <f{r <q t (what

is control statementT Describe different conffol statement used in C'rrith their struclure.)

eb

<sF.mq rcfrtE

dffi ft

frGW trmq-{ T&.FIE Tr$lq 6Ftr{+ Bqtqifi'q +fqt s<

(What is Conditional Control Statement? Describe different conditional control ststement with example.)

80

EE,r{{6|{qif

elseffi's{{tT'{

EeqqT F-$if

ffi<*rtoar

161-obl

rloQ.

fr
85

EqT A, E corv {-dlqs

mntilTl{trr cqsrtEm

8l

c(fi

cewfiR

{!fis cqqnrc q-qi' erF cqF[T ffi o-rcs qrq r N ea rlq

fi-

1o; e<iF cqHlq fr{ Tfts


q<mF q(T{ cq'q'rogq6{

ft

cTlntn rti{'rr{

("t) lsF cqHlq fr{ .rlc6


cqtlltF qfm cq=fiFqm

fr

crtcs-?

roF rTqqTl t{S fq6o qr< q<(

etcq-( Tc{r Rv

rtt{nr roF

ftg' q:{

q<rrt R{"lb

q<( strq-{ lTql

aF

I
88 r
Ee

qa c{rs' qr{s +{s- q-{rqs RlltcTq


"tfr* qf"tfinT s-{Ifr(5" esF cqwT cq.TI qE
)o q'4 qfrq-{ TIT rg Tf6 atritilr$ t{9s frrr qr{ | sl-m-{ Irrifr R qrd|E. qf c"nsrq ,_Iroi-*
Tfq e rfr6r qfrrTcf afiq 6q'a116apwr erfi cqmfrrt
lq.-ovj
qfr
q*
q3t
.{Ttr
cerrs
c{ c$lr{t
cq$T ft cfinf{ TFrm
{l qr{ r qqqnF r-\e, Et <t6rf{
W
ors (ln word) fr<lm Er{ | 6$r{-c tqtD e-<m +E.ITE qr{ ,,Five,, | " C{F[tqF frrl
rrr{Du oituq$Rfi? erFcq.lll-{g&frqqrs-{ 6rnTE cfir<Ff,t{q-$-esfr cEw{fr{
I

8c

8g

(CS:W\eCb q(6SCEIe

8q

r ft

+u=

ffi66f, TF{r6r tqiF 6qrf

fr+r

I
sb I
8b

co

r
c\ I
c)

ce
c8 I

esF

)( Ft)

(g qttr, ({) ffi c(qf{ m<i cvF fi{c{r

c("tTf cqls qI

frrqv, st fr{ra-< sqr erF cq}{tT frq


esFqqqn ffilqlo, fiffi qTTqI\otftfuTq-{I erfr cerwmfr+

qry esB
[ul.-ol;

cEHrq

{.-o)l

qF <-+tqoqiUf<q.Tf.a (LCM) fr{rrlq-{T qrB cEHlrfrqr


rotrfi esfr <ri fr"r-to< ftqr Er fi{rm s-{' esF cEHrr fr<I
qt <cns ft dilT? qt T-s er+t{ e fr frl fi qqF <jrqg qqqrql;r esF Bq.R{q nt*
[fr.-f f ; g.-sf ; E.-)]; fr.-ol, 5o; Ft -ob; T.-og; <I.-og, ob, l5])
cqFfRs{c"t<Emmftrctfr$llTfr.,{
I

for{Cel-{{h{ft{r

F._:rl

I for{'f <I{qjTnr-< esF cgW{fr{ I


I{r-}); {.-o1l
cs r for K\ do {'f qF-* lrv 66ffi srFa 3rq{'{ *l qqa?
Cq I do {ef {t$Dlcr{ quecp.td irfrnft qqt c.l6{ 'f6 q1'cTk"R :n11
"nrfu fral
cb I cfl{W"l;r<GTdr\r-r 5qKfi<iftse3? str ur}qfr.r
cb I ) c{m )o "l6srT(fi{FBcr fi"llf q-{]'F cofqq4<KQTq.r* eFF cEw{fr{ I
R_orcl
vo I qF q\fi M s N qT tf.cte Kl Greater comrnon Divisor (G.c.D) c<3I s-{K s-$ eTF cew|n'
?oRorrcs{IrqN qKcErrM<-\5(M > N) r(rw+ t a5 s tc qa G.c.D(q s;6 cr)e
Cc

fu* vn FrrE

e/b/rrr?T' enre

v, qrtr )c co v ftm

v-Ff Frrry,

w?lcz{ {rsz? w / oEq'G.c.D Ery e)


qlRtr Etr q\?BL?r rf.cr.e fi{ra-E qrr fr qsm esB cEHtl fr.al

Elr/ ?5i2ff,

s/rErm

4rre o,

v co \, frtr

[fr.-lo; E.-!o; T.-ob; rl.-ob, )o; (.-)o]

{o)l rfirq{ c{M {fttl "6s fuq<nc ftffi--r

qTb

&q

frw qt E{erf,rc rvaE c+Bmft-o smn oentrq.I RE

\909

s{t

\e

6{ffir{1rf Enfu

fi

q-{t ,4sF cEtEflq fr{ r


M ce|trF N eds qqqm!4|{ {C{t <rTF $t{ qq{tl qEq, sl cfif $-{l3f
ffi.-o5l
cq86{ fltrcq M s N (M<N) EE cq{lt qtRrs cq'sl Erq I
Eqry, ! GItrF n er,ftr q$r'qrflT I[G{r s{F qQs:nqr \fl(q, \5f rfi iFfl?r q$' esfr cEHtT

s) I

fr+r

s{ | qq|il q$rs Fwffi-{ csn fr{6m qfs q|fi ft 6<lr6il rttticr ?qlF'fr[g qr< r v6ry {'ltflwo
ircq ctl <n r & qrq
?tcE tq*t* TlFa qrytB SIE 1 qf6ry 88 qr E"rs qcq eErF "n T Trirrq
r1q6 gt {q rritrE ef fr{Grs s-$'. erB clHN fr{
,lFfi9llFt cqEfrTFT 6SrcK {l{
se t 15r c{trF \roo eft "Ffu )o &ft <trrr{lin sft<qtF rsrq<t
qPfrfftqqr ertr cEFtt{fr{
98 I a. ccmqr )o qds c$msrflT qlTq cffi K q-{t q<tF cqHm frrt
frcr
w r FWfrfu q{Nrdnr rrq fr.fu silir q{r fr snm esF rEHlr fr{ r (n ,4T {l{
I

6{sfi qr{

(o)

t)

)+e+c'+....

({)A+)o+)C+to+
(of) lo+\o+o"+8o+co+ ...
(s) )
c,", sa

qef{f,

cqrRr fV

"f,fu

fu

..+n
...+}{r-rr

1e1-"vl

. +no

fqlg c$l]Nfirtl3r 6{Fla-{ ffi mt< sq]' eTF rEWT ft"I

I (,{qE{ N q{

fg1fr c{ r<rFT 1.f arVf Wffi* $qrcTQ{S cq\extqn t)


! Cet6s )oo t{qqffi rq,,fEc$m<r 6qp4qfid655q-qr eTF cqp$qfr1t

q1-{

ts.-5r;<.-obl
r

Ifi'.-ul
[<.-rr]

\ryr{ (Array) <-"n6 fr 6ng ,mnfuo s fr-qfr-o qlks qcfu I qrrrd <rrrqlrffi enmoftwt
qIraIIFqT @ t lWnat is meant by array? Describe one dimewional and multidimensional array. Discuss

{ru I

lhe

necessities of using

tfi'-ov)

array.)

g1 I fr gfSlg WTff (Array) mffi T.dT qqF <fifT.{ l(Describe the method of array declaration in C.)
sb fr smm qoF ieHT{ fr+ gts'q"{q-{ EfrE-d 6dFT, 4lq rg rff6q ft c{ld{ fi<fix E3tts mrT
qtrf rE'ICEtr Tfrfr tfg Cit-?t:FGf'ffu ercsrsqEqT C{FI, ilT s T16Efeflr\5Er{ q<Rfur'sftq-?r
q\Fx6ry fi?ffcilqm

qt I

qnfiftr

lq.-orcl

I lntrinsic <t Library s](.Fr'c{'FtI{ 'fis-st{|T? q''lF lntrinsic s]vfffisTr{qK Brg{ <'{
qe I <ITql<l-stfts-gs qqw'rRe (User Define) cFt-(qHwss elsl-?t \3 ftfr1
q8 I cK-[qHI{ s q{ cqF$r:I {rgllilrq q{r fr srsl{ ft <r{El <rsrq?
qc t {{ cefF{l{ s lflR.r{ q<\ Tq cqF${ s qpa trfrn< {r$ sfiRrfi-drq{q frEir< rlsFtlv's"c3t,

c\

GEryq$rsfur

q\b

lc

qTFFRIFI E<'IK$.NFT{T CE[R]r{ rcre "ITNP 'ftGtqT?


q<tF frVrsr crcrqq fr{rs{ q$'fr q'sw e<iF cetHrq fraf r Wqt

TOq

[1.-ll; <.-ll; Kl.-oc; <t.-o\, os; fr.-os]


qqil anfi msrr qn+cq frErq{ 6sqrq fr{rl"{ q-qj'fr qTlr qrB CEFIN fr{ r trF"B
qc qE frffi slF ffnrr rslT fr'W tsfi qc< ftqt qs qlflt rs Etrt

ffi