PPS Ques Bank Answers
PPS Ques Bank Answers
/Input niGn
1 0
No
platn he berween odgsthrmn andlowchoy
difenee
Ans
lgurithm Flowchart
Plachart a diagram
Alqolhm skp by skp Creatd by diffevenB shapg
P1OCcdluxto So e the pvoblem shouo h flow ot cloa
Alqoi Hhm Complex to Flowchpr cosy to
Undersland. undersand.
39 alqorithm plain tex ore In fowchovh, ymbls/shapesu
Flouchart hovd to deh
Alqoihm ctasy to debu
xFlowchort " simple to
Algottm di fffault to Constuc
Conghuc
RonRme vovs
ronRme erYOYS are Thost eos thatOctor coria he
1o the proqHam
ileaad OpevaHon pformeo
t dividinqa nUmber by ero.
lack of free mUnory Spate.
Conmpik XYOYS
btC 0 (x)
a-bt (V)
lmical
Calculate dscim
-Ynan Dl-b-4oC
vut Faue
mt(-b6ha
Y4(b+ o/1a
isplan &
stop
( ) CEFC6)1b
6
(OUOot0 OliO),
(IOO
D&Ib
(123)
1238 3X
2 x8 6
(1n26)o
6 1236
16 33
6 y (0)
4DA) r
O(AgD)
TWT (12a2)
1667
(6s)
6 65
(158 (138-5)
3 S
(10.101)
(AG 1 1o
B x6
- x 4 46 A A yI6 10x16 =Ibo
AB- 1
0-1 0.062J
AB.lI6
o + 0062SS
106
ins.1sho* No 0.25
0l5x8 L+ 0
1452
115
(OID) und (1100)
Calaulake Complement
AM ( O o
O DI0
0 0
+
Thy at,
tken tpeen an oSix type) Thy
Keywords (cg. int, while)
Sdenb es mafo, total)
3. Constan eg 10,20)
4. Sing (eg. total, "hete"),
5 Sqtol Symbols (a (0,t})
6 Opevak
wOYdly
9 kyoovds: Ruycod art pre- defncd o Aserved
to
in a pv0qtamming lonquaoe. tach koquoord mant
în a potam. c uppors
lonquag UPporh
penfovm a syecike unckon
Such 0 auD, double, int, btak, ehe k -
3a kqwOrds
au
beak
do
e
Ther we:
double - skoyea
loohing pain numbeK, uih decimals
Such a 99 0r -199.
A G)
typt a keqwovd Utd in c
def
Pedef. The hypedef
ht
th
PYOqyominq to Provide some meanin u l n a m s t
altady Cxishng Vanable in the PYcAam Tbthoves
ue
milovly aa we defnt the alios hov the commanda n sha
(on that this
Say ewOvd cd to Aedetne the
name of on oltody xisnq Vorable
(i)Sumboi conan A symbolie consBant name 9itn
to Sone numeric (onson or a choveY Constont OY
shin Cdnsant Ov any othe
consonty. Symbolic CoDston
nomes Ort gMD knduon 0 (bnstont idenk hers
Prt-proe sor dreckre idefne ú ned
Symbolic Onuant deftoing
py defioing
when ani
an f the
se sttoment pasent instde the bods
An bod
of nothev O h then thi's úallad nestd
ny
f inchuele stediv h»
4includec (onio.h
Void matn C)
tnt i,a D
fov(i-1i-5;ita)
rh)
Psa Aht
ht fins tun prime nombery Uing while loop
loop
Any 1 in dude stdio.h >
fnt man )
fo i,a , Count
whle C4 =10)
(ount 0
while (te :
O^)
Countt
ba
1 count- o &a-1)
0vtpu
printf (1d, a),
t t ,3,S,3
aturn o,
Wha loptng rplao wih
do ou Mon b Opevatov
Ohe
Pogcom
m Tht tpeakn tht Samt PYOC
loopin
0opinq (an be dekind a
fov ( , ise; i+ +)
f (avt7 > ma)
ma YY T3
(av(ovY[i) mino)
min aYY
Wik a
procam to Teyese . CAD
Os a
Explan The
dffaunt orvay nkaltoion teth
tcch nique
Any Thex ade tuo wos to
sp ty tnikaltes for aro:
t h C9 she nkaize, Oway
elumen mu
mu bbe
nithial ted n subianpt Orda
Usinq dustonakd nihialttey, which allow
he values o thu you h peti
Speti fyy
subsunpt elemenh hbe tnthalit ed
YO amenh Con bt inHo nd în on drdes
plain the fpllinq tunchn of sting ond uh thiv
Syota Cand
ind tvample ( shrta cti)shepy Ci) &hlen v)shemp
Any
() sheotEO Tht shtof unchon wwH apend pcopy
c a
ho dest 01,
chav re tso] "Paral uni
shr cpy (dest ve);
fut Sldeot)
ehum 0,
shkn) h shlen) unchion (olulgles th lenh
gfven shing.
The shlnd kunchon defincd in<shingh> htade fle.
Synton in shlen (const chav * sh);
shin Povul universiky
int main ()
cha A 2o7;
pinkf (Cntv shie);
sCan yS", A))
pntAnqh th is hd shentA)),
vehumo,
lo shing sta.
Ang shing in c is 0n
arvay of chavaceri, folla.ord
by a NULL thovader To epresent a ching, o s of
chovacen oe encloscd ihin double qpaes ().
Stgoiitanre 0 i shing
Hhot the shing i(0mplthid.
uwrd td to show
mals he tnd h shiog. malply
mafply
wtd in shig by defaull shing c0ntoo yo
chovac mcan shoL the o cho in shing
end
hd
o gway (ontoutn 0 to sop tht awo
MemOnA ollocahon
Memo p shmonom
24 h their
aplain ckiferent types o fonckon olong
tXample Jobuil 6) Uaev defoed
obuilt unchon
builtn
Tht standavc Atbrovy unckona are
unchons o prooamming9
Thest unchons on defined ta bcader l
Esormple The
The print je a tandard rbvavy uncion
to send fomatkd Dulput to the SCYeen This
funchion
deincd to stdio h heovdev sle.
Htnce to Ux pinto unchon, we ned hincuce
<sldsoha hcode fle.
pgiom
Ans (i) Call by valur.
povomtts i
copitel o the pvmol pa ramet (oY) the
value o 1hvoviable td in the unkon (all in
the cal by value method,
P Befort fonckon
coa x-7d In', );
honog (x)
PE(aty funchion call
/-dn, x);
khom 0
3
i) Call by refeence o call by vefeence tht addrs of the
vorioble oxsecl hh tht funchon call ahe achiol
Povaneey. Value of the achual
Poiromets CCun be modifed
by Chonqq tht
famal povame-us Sine the
achuol
adde ot
povomehs is pomed
POMed
NONple Hchde e slelio h>
Void cha(inf Hum)
PBfot acdig salue intide bundhbn nun dp
num) + 100,
int a =
Do
P4 ("Bcsort foockion Call x /dIn", )x
change (x),
P(After funchion call
17dto
vthosn o x);
int tbonaer(nt);
int mosn)
int D,
14(fbonocci seits à : n)
fo (i=0, ien it +
i 1d" fbonacci(0);
qprth C)
int bon ac Cint i)
.0i:-o) rthumo
eae if li1) ehvny
he rto
(frlono cui (1-)+fibonarci (l-i);
number
Ap includt stdio h
int poweY (tot Di,fo nu);
i9 Main ()
int
powe (int bast, fnt a)
(a0)
Tchum (baut +
powe ( bast, a -1)
yekum 1
nt D, &Um 0,m
n: 910
)-ALE_ epAtnh u n fk na