Page No.
Date. 99l11 23.
Alphabdts Uppex leters case A-Z
Lowey letters case
Drits traugh 9.
Spel charoders. Comma J_slash
Perfod percertoge sipn
Colon anrperSand
Somßcolon caxet
apostrophe 48lde
Quotat matk less tha
? gue motk
exclamafon nask backslash
ndezscoxe lajt pareotests
# hash )
equal stpn lelt bracket
PipelPne characer aipkt bxacket
plus sip lept bae
miaus Sion
astexsk
he ccharacter sot also Contatns, wbite spaces and
escape Seguences.
is a tem that refers to the charackex tat
A white space ts
A whte Space is a Space chozactey tab
An
escape seeace is a sequence al two characters. is
tells the
the cOmputer to gerfom a fne? oy Command The rst
character of en escape seguence is alwgys ea black slash.
Date. 22|| 22
C Tokes.
unts o a c
dhe bastc and te Smallest
Ctokens. Thee are
24TdeotStexs
34 Constants 64
Kuoudt and dodies
Every aond fo a Cqoxam is either akeyoord
AL kouudond . (aka reseved wards ae basfcay the
O dharodex tht have one 0 more seguby
And, tese meanfaós, fa any
meanfngs.
Kaysaards
cacumstances, annd be chanó
prodefinad esenved aioos used tn
Hat have 'speial naaoiogs to the Comfler
2dentier aye the aames gtven to the proam elemtat Sudk
as Naiablee
Rastually, Tdeatitod ae the seguense og alphabebs er degi
Rales fox Foentag Tdentilex lam8sl
The fast choracex must be an alphabef l
-case) er on undeRscoe uppercase or aut
A Succeeding chaz
ces must be-efthe
oRer letters or doits
Uppezcose e Lower coase fdentitexs_ are
No speciol characer
puatuatiog
dge io c.
tzcopt the undersuore Syabols are alloues
No tw0
Keywod s Successfve underscoes ae allowed
should not beus
Thee is
on the leapth of sdents
deatpiex
Paeproce ssoo Stafemenbs:-
Tthese statements begto sfth
the prepocessor direcives #symbol and are also called
Taese sbatements diret the c
prepaocessor to înctude heoder
Ales & also symboltc con skonts into the c panóan
Come of the prepy0cess07 statemets that
tfoclude <stolto.h fos the skd input lautput junc2s.
#ioclude ecresth" for ele taclusfon of header 2ile Test.
#depae NULO jor deftatag cymbelc constent,AUL 20.
elobal Declarai
funcs whose erfster ce Rs known fn the maia C2
Variables or
deßoid eanc are called the Glabal Vartak
declara? are called te GlobalL declaza?
es Cof fne) i thetr before the fene main ().
This decaa should be made
The main ()une?i tis is the maio func aueny
tsel! ndicates,
The nane
mafol) should be
prn6Tary starts wrth tesmoatad
Executon aC should t be
oweYcase leers s
witten in
Semtaloo
Page No.
pate.2| 23
Boaces
Eveny p2adram ses
Uses a patr of wry baaces i3)
0n the otsey hand, Bhe ight bzaco iodeates the end
The declan! is pat the
anzaysfune ete used Rn tae c profxon ae declored
be Yostialized with their bastc dalo
*latemetsi
These ae sastruc to the Computey to perforn
-aperntozs.
theu may be îaput loutput statements, afthmete stateme.
Costrol tuemerts r other sutements.
They also ioclude omonents
Comoets are ezplanatony notes on some fnstrurons.
The statements
to be commeated on must be eoclosed itia/ta
The Kommet statemate axe oot compiled and ere cuted.
these ore subpograme
subprorang. a subpenáam is a Qune
The user-deßned fanc contata a set opstaltmente to
Speci tosk. pexfom a
These by the user, hence tye name useY-depYosd
They mau te wnitten eithex be lore or ates the moaîo () fune.
Page No.
Date. 29| 2s
ASample c panprom fs_Blven belou
+iaclude estlto.h>.
piatf el come to cha):
Qutput
welome to C:
Conapilkaj
Comprlnf ac pang koam meons toanglating tt icto mackine lang
An etoT is a prngzm
pmgAm shich oloug the pro6zommex to
here ane bastaly ve stegs to e succesfal executon
Czanting pnfram ile (Source fle)
293 Sovtag the pznxanm Cutth.c as exteatton)
34
44
Gemploton
You ce
Borland c4 editor.
Both Tusbo ctt & e Borland Ctt solkware pzovide aa fategrated
pzohon developmast environment (TDE) undex Ms-Das ustag
Page No.
Bozland CHA ane6 ves below.
Open the Bordand Ctt sopluJate.
the Sle menu. Solect Alew opBfon.
Entey
Save option: Save yaur C
fle menu. Select the Save
wth .c extenston
Clck on the compile. button T eTODS aze
e-oanpile the pentam usiog te Compile opton.
CRck oa the Run butto0.
Enter your iaputs în an execltion Windoe.
Resulhe
displaued hee if the înputs are conreck. Yau omay
data e-Bur
UNTY Patom:
VNTX pnvtdes the editor ox the Cpzofxammers The yi she
The steps iavalved hese are as
-ond ot the UNIX fallas Type the jollawîng
Thfs crenes a pngam fle namad leoam ofth C xlentton
Aert, ype puz oajzom Sayo de paabram and
This is done by presstag the ESC
Nezt holdag te SHI¾T key dousn and ten paess the Z
Hmes. ky
Noua, you will set te UNTX pzonpt ,type the Comnand
gallauing
the cc Command ser vec both the
TH pzaduces the defaull executable Compilatfon_
and lakiap
The arsd loads the eeeatable oliect lecodeaout.
tnto the memet
Page NO.
Date. 22l23)
and cxecutes the instzuctioas.
The autpat of elename.c is obBained by yyptaó acout ot the
Comnand
the staçes af comptlaon and knktaý daing ezectfon of a c
PrepzosesSor./
Liokex
(Erecutable poofram
Dato Ty pes
ofundamestal Desiveo GUsex deted
Basic data types Jata tpe
sstucte
bytes
gloat ubytes. bfuncls
L5poioter
L double- =8 bytes.
AScTT - Pneican std code or Ta joxm Daty chanbe.
Ez- A=6 5 z66 c=61.. upto
Symbol?e Const!- Tt s declaoed by
Ex 9 t de fire PI 3.142.
E ) MAX MHRKS (00
Gonst ploat I=3.42