F.
t2023t748L Total Pages : 4
Third Semester
Computer Science & Engineering/IT
Scheme OCBC July 2022
COMPUTERPROGRAMMING
Time: Three Hours Maximum Marks : 70
Note :I Attempttotalsirquestions. QuestionNo. 1(Objectivetype) is
compulsory. From the remaining questions atternpt trryfive.
$G I
6:'eQq Ed fifrqr qaT m-qio (q-qFE q-s-R EFT)
GTFE-r{ tr hq qqqi { t m6 qiq fr} 66a fifrvr
D In case of any doubt or dispute, the English version question
should be freated as final.
ffi rfr q-qil{ fi dk eierqr ft-qrq fr fufr if eiid qrqr &
sar 6\ eiftq qmr qrlrnr
1. Choose the correct answer- 2 each
ffi s-et 6-r qqq fiftqr
I Whichofthefollowingoptions is not anexample ofloops inC?
C d.iq q ffifuT ii t +tq-qT fr+-fl'Er oT sqrflor T&
ta
(a) for (b) wtrile
. (c) do.while (d) f
0 Which ofthe following options is the correct way to initialize an
arrayinC language?
c ii ftEftfud it t olq-Hr ft-6-fr tt o\
dra-q gfrfetq-dTilq
m-$ or e-S f,fl-fir tr
(a) int a[3] : {26,10, 43}
(b) inta: {26,10,431
(c) int a[] : {26,10,43)
(d) int a(3) : {26,10,431
Ft2023t748t P.T.O.
12)
O Which is the correct format specifier for float type value inprintf
filrction?
ffifuT li t otq-qi ft-6-fl printf th6qm ri stie i{@T h
ftq E-S q,i{e dfrsm tl
(a) %d (b) %c
(c) o/{ (d) %s
iv) Which ofthe following operators is used to decrease the value of
an integer variable by 1.
ffi.fud it t alq-+ Grfutci qrr v6 gfuw iRg{d * qn
o\ t d qer-qr qr so-cn tt
(a) && O)?:
(c) ++ (d) --
v) Which ifthe following is usedto access the 5ftelement of an
array(marl<s) inC.
C drlq ii ffifud it t otq-qr ft-f,-fl array(markg * qH
qfrfu d t*s EFri b ftq sqqtrr fuqr qroi t
(a) marks[S] (b) marks[6]
(c) marks[4] (d) marks[five]
2. a) Whatisavariable? 2
nR\q-d rqr +dr t?
b) What is the purpose ofmainQ function in C language? 4
C driq if main0 qmqq <DT .nn sAqq Eidr tr
c) types?
What are data 6
srdr er{q eqT dd tz
3. a) Explainunaryoperators. 2
{i$ qmTtet d eqsr{ql
b) Explainprint$functionwithexamples. 4
printf0.hqand s-qri{q b srq qqsEqt
c) ExplainArithmetic operators. 6
e+Ruqp* sfrtex d wrseqr
81202317481 Contd.....
t3l
4. a) ExplainforloopinC. 2
c ii sft qq o1 Hqsr{gl
b) ExplainSwitch-casestatementwithsyntax. 4
fuq affi €erle 6) fr-|ffi b srQr qqsr{gl
c) Write aprogramto print the largest ofthree numbers. 6
dq iicql fr t qe-t qS r+qr o1 Eic o-$ mr frfiq ftfuqt
5. a) Explain l-darraywithexample. 2
l-d R of uEr6{q fi srQr qqsr{gt
b) Write characteristics ofarray. 4
(t fr frM fttuqr
c) Explainfunctionwithexample. 6
4rEqw ol vqr{tor } srei Hqgr{ql
6. a) Whatisrecursion? 2
ft6et{ aqr tor ta
b) Write aprogramtoprintsum ofnumbers from 1 to 100using
loops. 4
6 fr sdrrrnr t, t fr 100il6'fr €@rciie q)E ai fiie o-{i
6T frqrq ftfuqr
c) ExplaincommentsinClanguage. 6
c drlq if oiie o1 eqsrsqr
7. a) WhatistheuseofheaderfilesinClanguage? 2
C dhaq d tw srttr oT .nn wqh d-ot te
b) Explaintokens inC. 4
c ii &iN o) qqgr{qr
c) How to read and write a file in C language. 6
c ddq ii q,rro o1 t-s eflq sr{c Atd ftqT qror.tz
8t2023t7481 P.TO.
l4l
8. a) Explaincall-by-valuetechniqueofparameterpassing. 2
eila-eTq-d-q +il+ct qTRETT ilf,+6 o1 qqsr{qr
b) Explain column-major order technique to store arrays . 4
it o\ dr o-{i fr qnaq-q-* iln-+r +} eqgr{ql
c) Write aprogram to print factorial ofanumber. 6
frxft €cel &. t;dRqa fite EF{i or frrrq ftfuqr
-€r€rr@e-
Ft202317481