Vous êtes sur la page 1sur 2

tffitffirffiffimHill

tt

Reg.

Name

NO.

: .or.r...r.......r...........o....

! ...................o...o.......r...rr

ffi

M 18L92

Third SemesterB.Tech.Engg. Degree(Regular/Supplementary)


Examination, Novernber2010
PTZK6|2K6CE/LE,3AZ2K6 CS/IT 304: COMPUTER PROGRAMMING
Max.Marks: 100

Time : 3 Hours
Instruction : Answerall questions.
1. a) Givethesyntaxof switchstatementin C.
b) Writea C programto find the sumof digits of a givennumber.
c) Whatis a pointer? How do you assigna pointerto an array?
d) Whatis a sfructure? Giveits syntax.
e) Brieflyexplainthe3 objectorientedprinciples.

0 With anexampleexplaintheunsignedright shiftoperationin Java.


g) Whatis a constructor? How do you defineit ? Explainwith an example.
h) Whatis a package? Givethe syntaxto definea package.

(5x8=4t

2. a) Whatis recursion? Writea recursiveC programto find thefactorialof a number.


in C with anexamplefor each.
b) Explainbreakandcontinuestatements
OR
3. a) Explainthevariousdatatypesavailablein C.
b) Write a C programto find the roots of a given quadraticequation.
4. a) Whatis dynamicmemoryallocation? Explainwith anexample.
b) Whatis a file ? Explainthevariousfunctionsfor therandomaccessin files.
OR
5. a) Writea C programto searcha givenelementin a givensetof elementsin an
anayusingbinarysearch.
b) Explainthefollowing C functionswith thesyntax:
iii) stremp
ii) fgets
rg strepy"
r) fscanf

7
8
P.T.O.

Irilffitililr||lffii

M 18192
:1.

';

y 6. a) Explainthebitrviseoperatorsavailablein Javawithexample.
b) Explaintheconceptof garbagecollectionin Java.Whatis theuseof finalize(
methodin Java? Give its syntax.
OR
7 . a) Explain the two usesof superkeyword in Java.Give examplefor each.
b) What do you meanby method overriding in Java ? How is it different from
methodoverloading? Explain with an example.
8. a) Whatis aninterface? How do you implementrnultiple inheritanceusinginterface
Explainwith an example.
b) What is an applet? Give the applet skeleton.
OR
9. a) Explain the following string functions in lavawith an examplefor each.
r) equals

ii) compareTo iii) replace

rv) trim.

b) What is exceptionhandling ? Explain the try, catch and throw keywordswith


oneexample.

Vous aimerez peut-être aussi