Sections of a C program
Sections of a C Program
)
)
)
Documentation Preprocessor a ;
ection > aaion I Definition section [>
NK
WC
mK
<
Global
> Main Function User Defined J
}eclaration tata
Cx = SSS = —= == as
HepHaceaa e @ R
390} tion b= Ah Ha yy |
| 7 1 ONratnNS QU THe headers!
Cc) LOR -
3 = Z d nN © hHHogvam-F nfoums!
| u mM TO Jink ih nead he SS :
z H S p14 aa
4 |
NJ
= }
=
>
lhe #fhclude sintement ihcludea Ge shecisi ee
| tic iPe ag a
shat 9} dunetion at ife_ffne_ ol _conbital are Gal
| | | ane cambifed along —uitfi 4 une
Teacher’s SignatureDate
yapt No Pape Mo el
Lions being Compited -
Rh Qetine Section E- She. deffne Section Comprises 9 diffenent
———— Constants declared using dfe define Keyusond |
gt Ts given by +#define a +2 |
\NGilobat_declaxtation section Campuses 0 ate te globat
dec lapiations fn tre briogstam-
__ Ot ts given by
| Float num= 0-54;
eT
—_iSectian-
o . rn ° °o to 7
mecegsaxuy fon cade |
otfien junction.
passing |
( } junction 4
“Allee _detined Junction = thecijied dhe unetions speciyed
Taacher’s Signature
$e
a...
~
—Hello.....
ee cae
uhen do i stop?.Ee es
«pl No yo Page No. F
as ben ine NequinementsS at ine Usert- fom Cyampb le
catonl. sum), division() etc:
Gampte Puoguam G-
apinclude
clusen l);
point} (" \n Enlen a_numbon"): a OO
Scan} ("2% d ", &num);— CO
A (num%o 8 ==0) —
oe tol} ( ese mania se by 25
i/loungpar=o)d— —
i print, | {"Entened numben js divisible bys
getenl ts
:Enter a character ‘a
Entered character is vowel
Enter a character :k
Entered character is consonent_ Date _______
expt. No. 5 Page No. ; \3
“64 Wnite a —¢ buaguam to cheek Cntened chanacten Pa
Vowef ox —_Cosenent :
4tinclude —____—
#-fnclude < Gmio-he——________—
Void main () —______—
5 —_ i
Lp
__clusen(); i)
Mu oll
i CQ din Ving
= bs wye
ce eee i mt ee
— pal wed Chanaclen is. Vane"); a 7
see eT i a
on gee My s a
— pifai}l"Entened chanacten ig voweP");
break >
detautt-
print4 (“Entered chastacley is Consanent "J.
. getch(); > Le
Teacher’s Signature ee ee1234676510_rite
expt. No 6
Page No. 1S
cjurite a C prtagnram to butnt numbes Jom 4
Skippthg 5 duom 1 to lo Se eae fe doa and
|}] Preguam. to prt num bes ‘piom 1 to Jo and Skibbing 5
4xiom In __lo __Sequienae a
om +pinclude +Stdio -h>
_ dtinclude< Conio-h
~ Naid main)
+ Aah ieas, iu
cagral). _
dalle is = i re
__—_—_}—
——— (e=5) ae Tn
nics _ Continue +
oo “ha. & dl
“iilEnter the radius of circle 34
The area of circle is= 3629.840088
The perimeter of circle is= 213.520004_owe
4 mxite apy
Ug fnelude _—_______
Acid main (1 D
Le :
loat 1, Nea, berimelen + -
E = 7
-——___ = =
Taacher’s Signature —_Enter the first number: 3456
Enter the second number: 3455
cr eee oralDate -
citi |
Page No. ey 4
ar nile a ¢ ‘praguam to fad eifch ine
Ire puaguam to ‘Combane ture numbexs. and check. uxRich _|
is Foe —_ - eae
+z ine selsceeetsi ee h=
"|
4 Include + Cania-h>—
_Meid -main()
~__fht_a,b a |
oo Signature ______—Enter the marks of student 45
congratulations you are passDate oy er or!
Expt No. q Page No Dy
qd Wwulke ac pagan to_check Student {& Jai? on pass fn
e€xam--——___—— :
“seasick 7 : -
He Tema anf 5 -
mn ee
tht maiks; _
>= : =
eee tet
oC een youre oie)
|}
eh a ;Enter a character:
its aExpl. No. to bigs Ha
jo'l Linite a ¢ broguam to dlnd NOCTL yobue of Chanacior,
|
I briagham to buint Weer volue q entened chanaclen:
+f include
Void main)
: | ft Bigalow :
____ pufat{( Ente+_a_chanacten « ‘Ve f
mee Sc! wc); —— _
pete! if i is. 96 = hd" 6.7) >
a ici a) PE
| ia tina facial
- oe & a ee _ Lo in i somll 7
Peed ial lee
— a = a
—— ee ee
ee i; : i
|Date
Page No as
Exp! No. Ty
444 Witte a pxtagiam fo print {Re Jotlouin
, L q
2.
. ve
Se
‘op 6 oe
— #ihclude —_________—
__## include < Conio-hz Le
. rj So () 7 ee eeeeuue
Teacher's Signature _____—__——table of two
A
ca
6
by
sis)
cr
ea
16
abi]
20~ Dace *
* a a _— Page \ ~~
——$—_——$—————— =Hello
60)
Hello
Hello
Hello
Hello
0G)
Hello
re tl
world
world
world
world
world
world
worldDate
i ee 3m Page No. _ QQ_
of el a. ie {pragiam fo puint Hella wartld— lis |
_times- nica O° Tn ee ee
IIC_puoguam_ Sie
ine = : a on
include < Conta-h> =
eID .Enter the value of a and b 2 6
addition= 3
subtraction
multiplication= 12
division= 0
remainder= 2~ Date
Expt. No. \y = i ——
Page No, 4
ENO. sf
U
Wu-|) Lite a ¢ bhyaguam to add null
. a le dade 2
gel Remainden Value | tRe eed, Subimac,and
4.0
spinclude - Ses
3 paid Main) a Se
“- Trot. a, b re ft dH, div; _ . a
== . elise (1; =
prfnty ("Fntex tRe value ol a_ond 4!
— Rian thd, =e _——
—Sis tbs
dea-b- - -
} E ‘6 = Atha ; ’
p WU 3
he a = 9 \ ~~
1 Oo
i oon
—|___ putin - @f. 48 dey
eS
7 a tt o. a i .
iq 98th
|
Teacher's Signature ___—-_—____-Output of expression is= 8_ye4 ite AS buaguam ta caleufate Me value a bodes
€ xpresoicm
S+2Xlo/a +13%S t+lafa - S¥a-4
ibfnclude <6 Stdio-h>
sie Tnclude_
tt Include < Cania- hz
Vold_ mafht)
{ —— ne tern cc
soot ete : _ - -
pufi Lok —
i Scan, ("9
yun
{
pxind
_£ eirh{] - a
" :
i
‘
|Pee Mees
You entered a even number_- ees a Date
xpt. No ao. a =e Page No. yy
148 Write a —C_puegnam _ta_check gien numbew fo even.
_ lox odd using gota statement -
u u ij-value of bitwise and
value
poate)
value
PBT
value
of bitwise or is= 15
of bitwise xor is= 11
of 1’s complement is= —36
Paeet are Pea ean)
of left shift operator= 28672_ ——_—_ vore
pee Hen! ie —
or : Page No. 4.3
i ec C buognam fo ibust wate: dhe use a bttunaec
tt include Date
Page No. 4 g _mter the marks :45
[la Coa aCprt is a. - Dete
— — - — a Jan WO -
Wad No: 4
‘a Uitc aL pt esas £ ole cl
and St Student fa “bass Student f
19 7
URioh Pade sets Ou — |
| — i es -
: Hiielude
stindude < Conio-hz |
Votd matin) | ESI
: 1
~lnt_i,num;
%
| “Clygon()- 1 ST
—}—Ping (“\n Ente te number Ublo urfiich count fa deslsed' )-
j 0 tt 2 aEnter a number 34
Enter another number13
The larger number is= 34
The smaller number is= 13=n : \
expt No. — o8 ———_ = = he Page No, 5 Q
‘sf bintte aC piioguam to pxint ie Smaliest o| bur
pumbens — +g: aoe Statement —_
—| elgc - a
tt 7 -
— ee “She | }angen number “ol At) 5
mall ~ pana Smale number is %d! 4\>
Se =
—value of a before calling function is= 5
value of a after calling function is= 25_Ne 2 2peeNe a4
| pp
Pag 65
aH ee aC bxagnam to pint the Jollawhg Sequ-
= —_ —_ a
x - Oo
% *¥ /
YR RK 7
¥X KX &
Hipclude=sl di: , oe
= Vata omain )Enter principle= 1200
Enter time= 2
Enter rate= 5.4
compound interset= 1333.099243_“rot. No. ee a
beget. a
seartte aE Scscatin to find Combound Sn tenet
— #hdlude_ maltEnter marks of five subjects: 92 92 95 91 85
Total marks= 455 .000000
Average marks= 91.000000
p-SiODate ee
ee . a Page No. _GY
ile gC hogton fib neg “gece
EXP
ee
fp prdchon kina LY a
mar oy -
[pital (Bauer fags = fog, peneniage )— —
: : x a / - csinter radius of sphere: 1
surface area of sphere is 12.000000
volume of spere is 4.000000_SSS — Aape No. — .
| sal
cl ms ae Wee 4 by aP oi
etal 3. becgna ae jihd Volume And Sunjace
|
qinclude |
a ask 4
| pent" Flew meek numbex [tat ae |
AL oO, q - ———$_$__——
|
oS
i
— | case 4
- ° t Qo ' 7 7 ee =
—|__ pps - - _
—| Case 6 = ~
Se ray vy ee ——Cnc aSe Soa 4 " oa : .RAE TNO aS BL a 1
Enter the number: 56
Table of 56 is:
56 1=56
56x 2=112
56* 3=168
56x 4=224
56* 5=260
Sars)
56 7=392
56x 8=446
56x 9=504
56*10=560—
Date _
|
| Page No. _ Bat
| expt: NO: = 8o- pens
vaguinite A C_pragnam lo briint tRe fable of a
- number Cntexed by tRe Usen
—— . = j |
sein clude=Stdio-h= —
: "i i
tfEnter number of the month: 1
january _a poo tial __ Pate No. 88. |
i jyntle_o —C_ progam splits Jas name. a tRe- |
yh eel a
Pang Cn Mant is Apuie ")>—
——__else ij{manifi==5) = ane a
Tee \n_Monis_is— tay cri
To (eee nena Seea
ae Ment ts June’ ey ———
ia lee Gaia 224)
—_—
Teacher's Signature:——_—. — Page No. 8 P
= a : = 2 ~~
= pay Mant 19 Judy: He
__-else— if (monies 8 g) ———
_ ji
—— a
palo (“Mani & August");
—_ ) a —
__else if (montR==49 ———
i u ‘ies . a
aise bent : =12)-
, HB. ee = ay )
ae Here
___# _
- ae bl) 5 .Enter two numbers that you want to compare: 9 8
the greatest number is 9_Date _
rpt No 44 Page Ne a
uid Wnite a ¢ progam fo Jind tRe gueatest
qunetion
include _
Hincdude
int_gueatnumt )-
—_int mami)
_— int Megutt-
Tum ben Using
( = ed ——
°o u oc 6
3 — —
f
: Na 3 W ts “
hrs - ;
«,
7 = je
= —gricotennum =};
p.
xetunn gycalewnum ;
.
+Enter numbers whose factorial you want to calculate 5
factorial=120_Date
I x} Ni Pape Ni oe.
Waki atte a C puaguam fo Calcufale factorial qf a Number
using Recunsian -
FHincludesstdin-he
+Finclude «Canto: hz u Pee
abi eee tn ee
—_int maint) ae :
EAR es ATO
i a 4 C fale ")~
Scant" dad", fn)
Ie cee ee
“elseif(ne-4 1)
die tunn 4 ;
fo.
/ i jl
—_ Hefusn nx JackCn-2) ;CCG cc coos|
| Fapt. No.
he aC buognam sie HtGceicbes Re _
| Stonage. Classes ; ne
| heineude - —
q
—$}§—
Page Noee
Expt. No. .
Date
ee No. st
os uel | a Het TT Aenea ees MT
| set bem) me ben =
ek Include — a eae ee LZ 7
eel pment
{ i 5 oe
| Pie Sent;
sy), Gop See | ye f a i]
chon chalacy- z
ne
oe “ \/ { 2 e ° \ 7EEE nk eae eee
value of string is hellocI
{
[uy hiss. 4... ¢ fella
a In cat ( Ch,cha),;
Date ant
bxpt. Ne, Pape No,
to iRustorate ‘the lise
| {unetion -
_ include «stdin -h> =.
tH include *Confo-h>
_ tFinclude
Void main ()
ET
4
So qd Stucat() |
— chan chito'| = |! ope Ba tag
chan chal toy = het alle elle eel 7
pala Value. of ynst_ shag {3 __%S" ch) .
Tk al
a a
——________
. = ae ———- —
gue a eeEnter ist string:hello
Enter 2nd string:hello
Strings are equalones Le - Date
|
mont ai No. o | \
\ eee . )
ss bunite a 7 apes ien litcie “ihe Use eg slaie mbt 1 a
_funeti on
|
|
___Yefnctude =nter a string shubham
‘tring you enter is shubham
everse string is mahbuhsDate
Expt. No, ______—--— Page No, 4 _.
Hod Wutle a C praguam fo iffusknale Uke Lise Qf atrerevt |
un chion-
_ #incude
_ Vet maint)Enter a string SHUBHAM
asa me em na
lower string is shubham|
|
I
ots apl Now
sowie ac btoguam fo PCuattate Re. Loe. a: stunt 1
| qunetion -
ies ahadea alata
fb include «Conio-h>
4tFinclude sstning- he
in main ()
Chan Shula, ay;
potin tC" 7 Tiss, Stuing= i
~ gets (sti); Ilneads git?
~ padhyt'shitig 18 oS” gto).
-
_bankesna steal " gt
L getch() ;
Page No 2
| _ =
+ ss
ee
mp —— — -
b+ - | — =
— _ 7 asa
| | -
en | / 7 - |
I | a a — — :
ped a a
i [Sec - ss
| | Oe
rE ss _ a
| i ae
I - ‘citdees
- ; . Toacher’s Share’ uncEnter a string shubham
string is shubham
Upper string is SHUBHAMbat No.
aii Suniihe < ac © poegam i
+ Spa
__ tEhhclude esta- hz
_ Hine lude <(@m2-h>
——thinclude
Vora maint)
ia. eer
Date
*e No. | aa. a
a ie Uae qd shabal
i al Hl
Stn),
—— Ring ag aan,
i SSeS li
Cm re TT i :
et why) a= joe laaBefore suap =p1=10 =p2=20
after swap »p1=Z0 xpz=10_/ wise No, JQ
Bal untle OL. Cc. Tage Ham, te. Snap, _ ‘numbexa_ufinouk,
ng tAdid Vasiable - .
fhhdlude oe - a
nk ase, bBo, Xps s = Ha, x pa = Ub
Swab: *pi = Yod *p9= %al * *pd «pal.
* = *
pe;
ea = =e nearer a
ey her Sac eas Yodxpa = Sod) *n2 *p8).,
eee i == ie =
Teacher’s Signature: nting array clement 123 45—a—_
_ Date _ a
: mee No. 43 =
Soe ee al
sill No. _
7
tie = = —— = = e255 =
a 7 _ _ ————— a eae a 2 peacvenc ne ens
ES er ge an = = ae! Se
= — ee a a . —Address of p variable is 65524
After incrementing address of variable is 65526_Bate
Expt. Ne
Pape No
14
nu] Wwite aC .
au] bowg 1am fo iRCushiale Use Of Incitemen.-
-tihg boathtex Th ¢
+indude
$Findude
= main ()
he ‘tnteaton 8
—p=fnumbers
a ee ee 48 You", PM;
se e —
0
|
i
Bs
Be
Cc
+
‘IAddress of p Variable is 65524
After decrementing address of variable is 65522_Date
J
jay No Page No 15
buf wyite a ¢ program ta ifPuatuate te lige of decneme~ |
_oting patblen ine £- |
tt i! dude «stud - h=
He include
Vaid main()
j
int Numben = bo;
int * pa
p= vaumben;
Pinger vontable P fs ou Mail
pay ‘afer devenent addaen. ef ante pi. 900),
SSS ee ee — = oe
Teacher's Siqnaturs
asee eedDate
we No. _————______ = . ma
cS / ate a C uogs
Cc
~ #thelude
Oe es LA
|
t+
°
oe eer IIL LON TTT CCT TSUN
int *p- in EE
See ne ve = =
foc ce ea ee er ae a a rarest |
Teacher's Signature ne,Ia eM eters Oran o)
the result after addition is 500at Ne ——
saq Write Q ¢ pHagnam to
_ Date
oo
|
= No fh |
SS ES ———
om to Rtuatwale _ e_lee q bein,
as Atguments -__ EL
++ include