Assignment 3
Assignment 3
Date
Page
2 macks questions
Exasple
include <stdio.h
#include <(onio.h
Void matn()
int a.b,C 3
loat avqi
prtatf(Enter any thrce intagcr ualbcs")
banf (" d d l l a b . Re)i
Lavg - Cato tc)lsi
pinif ("aup before casling" En aug)i
clAsSMAte
Date
Page
Laug=(float) (atbtc)L>
printf ("aIg after casling 1. Fla,auq) s
Lqctch():
Sumbal Name
tqual to
Not cgual to
lees than
qrcater than
less than cqual to
qrcater than eaual to
Signed characker.
%F
gned foat
Afloating point numcer.
Ashing a scucnceo
character
Double
LE Long doube
classmate
Date
Page
ockal intcqce
shot unslgncd inteqer
+include <stdio h
# íncude <conio. h
Vofd main )
inti
clrecr O3
príntf(" enter the valuce í andi)s
oiotf(
printf(" Both the ualucs ate dilferent
and cither or boh are not cquat to 5"
qctch);
Date
Page
4mark QucstHona
crscr ():
printf(Enter a numloc "):
sCanfhd', i);
printfEntered numb er is d
qetch)s
classMate
Date
Page
Prc -decrcmeat
Phc- de Cre ment operator is uscd to decrcase
the valuc of ariable bforc uslng in.
cAprcsson.
#include stdio, h
# include <Lonio. h
Void main/)
Example -
# include <stdlo. h
# include <conio. h=
Void main()
int a - | 2 b 25 ;
clrscr ():
printf(" oukput - edRalb)3
qctch()s
Date
Page
Gyntax -
(ondilicn )2 truc-valuc) lfalse vale))3
Example
# incude <stdio h
# Include <conio,h
Vold maln ()
clraur (:
prinh£( fnter the number"):,
5canf ( di)s
(it=-D)2 Cprintf( 1ed ís cueni)s
(peint ("dis oddi)s
qetch()s
Documentation SecHon
Link Sccion
Definition SecHon.
GlobalDccdarakion cction
main O FuncHon Scction
Decaraton part
3
Exccatable part
SubprogramSecton
Funchon l
funcion 2
func tion
un ci on n.