¥SeonlOt TE is Q@ Inbvilt Ibapy-
Function whieh ig declared im “ Stdign
header filo» ze ig vsed to take
trput From the user. Zn Seon? Final
‘must be used ta format Specifier
Aike hay hey he ete.
@ operatora +
| operators is @ Symbol. Ihat USed te
| Perform mathematicat oP logicat
| opera ton on varlables bre values:
— Types Of operator, t
© Avithyn atic operatira
|B Relational aperatons’
Go ‘Logical dperatirs
@®. Bitwise “operatsrs ‘
Oo Assignment operators
| ¥ Apitymatic “operators 4
IS Lt. 16 the Emost jmportant operator.
xt takeS fumericat ‘yale in the rm
of input Oma Beets praduce Single
numerical value efter Performing
oper ahons. t| * Logical’ operator 2
aa
| CH) operaton: use for. Additions +
| OD operator use i far Substration’
o OPE Pasture OS» far MulHiplicetion.
| PEP A toe
c” Mam Use op | divides
|
| Cu) OPerater Use FOr modu la Hor
| J
* Relational OPeratop s
ae j
a check Numerical equ ally or
ee ete THiS operators
(EVERY UsefUL- in Condi tional Program
when Wwe Cheek Leondition betwee n.
two ;
Operands. -
lOPeraton [nearing
~ sides tign oe) |
> greater than
Az dess ar equak
22 Qreatr arequal
==) | compar dstion
ee Not e4bat
———
—S |
é
Tt is vsed +o combine two or Mone
selaton lo jeally. Zt always Pradvre
Single result in the form of true
ore Falsebut at a time any one ree
1B wold.| Fitba “aod civa Finelaved copied ated
CH AND’ CS 3) —+, both axe true: thon trie
GY OR -CLE)D >. amyone ois, ctrve the tree,
(hi) NoT Cit) @ , Z TE BEN
¥ Assignment operator +
It [& Used to Sormething: es asst
the variable. ovr Ngko - 2? fy
b oypeR ae a wl 4 (9S ory,
| —"
ir Simple : enn ce »
‘ Se x= 5 ete]
& Bit wi ée epevrartan +
B Bitwise “operators Ome Used ts a
individvat bits oF A numbers Tt Can
be Use anly, integer ie Value % nolll
Floak, double “ee. , 1
oPeratse | meaning ]
»> Bitwixe’ omd 1
i “~n 6R i
oN 4 non. voit) 9
na
. Compte rent E Not operat)
iv : Ol) tae shi
> >) Right Shit.© keywords
Ss 5 whos
Te ie oa) geserved words <
: ; in tha compit
meaning already defined ‘e
There os 22 keywords in c Program,
We can’ use keywords For our
Per smal work,
Exainple int's chars wold, devble; de,
For, goto ete
© Datat type
Datatype is a type of ‘doco, Ghieh 18
vsed In the program’ :
mother Gord, we can say that It
14 Used to declare ca variable.
117 OP-* gp
Datatype spect how we entered data
M ovr Pragram § ana What +ype a
data we entred.
[Primary datatype Secondary datatype
Int >(byt) .
chan 3G byt) ftray
Ploat SU BYR) - 4 tye tie
i uc Lens
Vatd =(No Size ) ye!POF Paming > feces Henle (ty
|®@ Syntax Error ?
| ences ete
Tts oOcaeur'’s when, we Vvidlese FY
4 longus.
grarrmel cally Pulin of programming
ge: yo i
@ Runtime erragps .
iA omy error tnak, Causes
/ atime error
| abnormak program. termination ducing,
execution,
@ Logical error +
A logieat error simply ‘an incorrect
translation OF either the Problem 1 Statement
ar the algorithm, £2 WEG Dot toe
@, Tokens & Di
Tokens ase, the -smalleak unit of O Progra,
we con define the token ab the Small
indivival elements on
| ® classi€icaton p€ Token £0
| pera aE a A
Tokens p34
p—> Keywords C32 key. In c)
-— Identifier
fo String:
—> Operatars
Constant C Fixed tate)
8 . i} i
pecial symbot > 3l#lo De ete;
nA Identifiers +
A tdentifrers, Pefens tai name Ue Used te
identify Variables functions, Structures
ond, Sa an.
@ Varioble *
The name of Memory location 14 Callad
Garioble- Tt 18 used cto: Shire data,
Variable ane Changoble » we ean change
the value oF: Navseele during the Bxcutin
oF Program 3
— Types Of Variable =
@ local variable
@ citebat: vaniable
@ Statice variable
@ putometit VaPplable
Se external Vvaniaste,
% Local variable =
ee
is declared inside
| Tents variable thet
the funeHon ov block Lé Sa@licdhlaéatl
Variable.
* Global variable F .
oe
A variable that i4°
funetiom of block .14 called global van ible
declared OUtSide the1S)
sla
# Automate variable +
PALL variable are declared | inside ty,
Noeks ane- automat*? variable by)
default. Ge @an explreility declang
aon automate variable using aude
Keyword:
% State Variable t
A Variable that iS deetared: witha the:
‘Static Keytward called Static Variable
* Extepnal Varjable +
G2 can Share a Varlable, In multiple
Sources Files by vding culth an, exter nal
Variable.
® Constant +
Constant is an (Cah) entity that Petry
tO Fixed Vales ang it can't be
Modified. -keywords — Const.
7. TYPES OF ConStone
oe Os
5 Integer constant
D character conStent
5 Floating. - point Constary +
} Stritig tonsdane.1@ Loop:
Any repeated task mare than. one time
“ts Called (oop.
>TyPex of Loap ie
Pe ae '
© While. (oop. b
@® Do loop,
@ eFow} loop >;
| ® While loop +
ae
Om TONGA the Conditional expression |
| frye, loop body Stertem ents CEM be executed
© Flow chaptt
[Prittali2g tien
L
—Keraswal E
_ Code inSide body oF
while looP. executed.% Do- while loop t a2
do While loopis a post ~ test loop.
Ea i® Similar to cuh ile, loop excepe
The do- While lop terminates ‘Wher —
Me text expression 14 evaluated to
(be zero.
Flow charg 2,
| % For Loop +
For loop execute the Statement ot
program, Several times’ Pe Peatealy unt.
Qa condition Peturns False,Flow ehart &
vilnitta lization i ad
| Ce ISVS
Catieaitetl
|
|\__ a deer | 5 4 AS =
| D=l2/s/24
pas
SL What is mainwy- a
SMain 18 A USP -gefined Finchon’ because User
| i& Mesponsible to define. the logic: india the
Main funeton.s Each aod every _ Program has
atleast one function which fs main’ Function.
The execution of Program alivaya Starts and
bends with main Ffuncttons
# PPINt EO =
| THié (&Used to Print any type of mess
Onmd Valucs an the ConSeles wa UBe Brine
Fonction. with formet Specifier like ~ hid 5
| GO, eo 1,5 ete. Le tS aL, MbuiLé; Hoary
| finetion whieh (& declaned Jw &Stdjo.n”
| header €ile-ae) Punetionss
Function axe USed to divide a large
414
€ Program. ints Smoelay, pieces- Tt
also Called procedure ov Subroviing.
e Advantages z
Owe can easily debvg @ program
oSing PEagReM Actions: -/,, 1 eons
@ we cane Pewsniting Same Logi ¢ throug
functions: :
Types oF fimeton +
Two types — .
@ Libary, foneti on © Print€O), Sean¥O ete)
® user define function ( created By User
slike add Grete) .
> calling oF fimetion 2
@ cab by Valve ; ae “
@ Catt by Preference
# Call by voclvet
yin Col by Value we PAS8e3 the value, of
Normal Va vig ble's touthe calling functions
* In Colk by value, the aAetwal Vale ofA Parclle logram denote
q@ .
[ance 7 input Lloutput type .
at . a / ;
i aslthmeHe insteveton:
THIS Symbol Mostly VSS &
Pepre smt the process
© © — +> Diamond Symbal ee
. i a decision Point. >“ y
(Cy) Algorithm yy ee
is a Step by Step eimai Pro << dure »
a set of insteucHons to be
yr to qet the
Z¢
Which define
execute in a certain arde
desined output.
€&D comite (OG program 40 “make wREcHp
multi plicatat ta ble >:
=> of (nclude
. ~
mt matn€). .
( ¢
int NLM » i d o at : +
peinte ¢ enter the number Whos mou ive
eatin table (56 4 be printed (n')§Variable can't be Chongéed eT F you
Change the value of FUNCHOr Parames,
itats, Changed Far the current Fonet'on
|) Wy bud ft.rnot Change the Vale
| of Variable InSide the malin Fimction,
*K Call by address
TN Call by address we passes the addregy
| of mormeL Vartables to the calling
finctt on. =
TN Calk by address: the: actual Value ,
Of Variabte Changed SIN Lie mak
Ar qumenk
@ Flowehar+ +
Floweharts ane. “diagrams Showin ¢
ce Exac€ Sequence oF logical Steps.
Btn a Graphical 1ePresemtation ov
an edgoritnm, ro i oo
® Basic Symbals Ved Im F lowe hae ae
eet
@ Cy = TR ovat. Symbol indicates
7 Start Omd Stop of the
Program. -seant CGO anim ) 3
for Cisogi xn 5 i++)
c ry vn i
prince CS Md ed = Ldn gratin (yf
}
qeteh Os
Peturn of
CD ¢- program: +o tind Sumo¥ First
1 Naturak num ber,
DoH include Kstdid HS
“ink matey:
ME Tym. Sum A
print (
}
«enter. The last natu rat number
| YOY WA tbo tag ‘Sum ok rns
sean’ ( “nd”, ans gin i
Por C fel 5f for “different vedngitona.
Br Wis? Stetemnend there Ge ione HC
1 Cond Tat on: -Omd “MUL pte Lae TL coral
Han dnd one else block.
| a+
% Nested j€ 2 /
“Whenever. 1f— Statyrent contain (self
another jx - Stakemmk | & Called nesicd
iF Statement .
ae (is) Array + f
Tt ig O Variable which : Stare mare
than One ovaowes OF Same. datatpe
mM-A@ @Gonkhnvovs Memory locaton:| Print e Chad’, eds
j
| _
String +
String ane aetvally one dimensiones
OF array character, Which +18 term.
naked by © \o° Cnutt) Chara ete. this
Nult character
Mdicates eng iar the
String.
ete ASCIT C6de of '\9) charg 4 n
CHop 15 Zero.
* Declaraton of String
0) Character Array +
@ char sty [6] = BEY. LU, ON} °
9
Behar SP Je “years 5@ chon ste [2093 5
ci) string painter +
”
@ Char * ste o “HELLO 5; 2 340%
of oe 7
¥ Strings fineton +
vey “dy atl
@ strepy = copg one Stein 4 +o omother String
@ strempa Compere two String
2
@® Ste low 3 “FoerePind the, omg th ot ida
| @ ‘strrev = Rewer se Ste fg. us
ee Str lige > covert Str Tag upper fe teuen.
© Stropre > Covert String lower des 3PM
1@ streak > Merge two String?
| we pointer Fo 7 = . .
| A poimicey 16, veriable thot Contains’ the
address, oF another Naniable sft
| Exomple =
mtasios — . . ae
int * pep >
ptr= Say
printé Cray Pfeds ML IO4e
pring) Cra E HDS yg ear’ res
eteh O25
a ° while working with pointe r
aukeuk — — swe need twa unery oPEraten sc,
TOU GO*# 2 Address of operate nr
ta @rtn- ‘value Of Odaress Oferabr
—% FuncHon pointer +
dz the
| A pomter variable that hol
address af functon (% kKnoNn ay
Function painter.
Syntax t petumm type Ca var. Named 4
sou PaYGmey |
| © Void pointer =
cee eel
A pointer which 1s declared by te
l help of Sora’ Keyword Is Celle d val d
| Pointer. T+ com haid ony TPs of
| AAdVERE © tHe Size OF Void PaiInk ris
| 2 bytes. '
|
| enuce Pointer +
ee es
| A Pointer Variable trot 16 Initialize
RTH the NULL Nabi: oat tye!
| Poinky
Soares
time “6¥¢
declareton 4x CaMed NW Pointe |
The NULL pointer thet doestm't point
+a any “Meraery locaton, 7”
© Pointer +o polnter +
A pointer variable hich halds o dG dares
oF onother Pointy, Variable 15. called
Painter to POINTED. - we CON 1M plement
the pointer ‘to pointer OPEPation upto 12
| Stages > ores i *
| ee Oe aay