0% found this document useful (0 votes)
10 views9 pages

VVHS Computer Prelimn Paper

This document is an examination paper for Grade 10 students at Ant Vihar High School and Junior College, focusing on Computer Applications. It includes instructions, multiple-choice questions, and coding tasks that assess students' understanding of programming concepts and Java syntax. The exam is structured into two sections, with specific questions requiring predictions of code output and error identification.

Uploaded by

Aditya Parte
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views9 pages

VVHS Computer Prelimn Paper

This document is an examination paper for Grade 10 students at Ant Vihar High School and Junior College, focusing on Computer Applications. It includes instructions, multiple-choice questions, and coding tasks that assess students' understanding of programming concepts and Java syntax. The exam is structured into two sections, with specific questions requiring predictions of code output and error identification.

Uploaded by

Aditya Parte
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

VAS GOENKA & ASSOCIATES EDUCATIONAL TRUST·

GRADE 10 ANT VIHAR HIGH SCHOOL AND JUNIOR COLLEGE


DATE: 17-01-25 PREBOARO EXAMINATION 2024-25 MARKS:~~~
NAME:
NO. OF PAGES: 9
SUB: COMPUTER APPLICATIONS TIME:
2

DIVISION _ _ _ _ _ ROLL NO: - -


• A nswer to this
- pa d paratelY ·
• y . 'per 11111 st be written on the paper provide se
ou w, 1I not be .ill
• Thi t · . ' owc>cf to write during the first 15 minutes.
s ime is to be ~
• The t· spent 111 reading the question paper.
ime given at the head of this paper is time allowed for writing the
answers.
• This pape · d.
r is ivided into two sections

Section A and any four questions, from section B·


Attempt all q st10
· ns from
. ue
or part of questions are given ·m brackets.[ 1
Th e intended ma k f .
r s or questions

SECTION A

(Attempt all the questions from this section)


QUESTION 1 [20)

Choose the correct answers to the questions from the given options.

(Do not copy the question, write the correct answers only.)
i. Corresponding wrapper class of float data type is ............... •
(a) FLOAT
(b) float
(c) Float
(d) Floating

ii. A single dimensional array contains N elements. What will be the last subscript?
(a) N
(b) N-1
(c) N+l
(d) O

iii. The access modifier that gives least accessibility is:


(a) private
(b) public
(c) protected
(d) package

Page I Turn Over


T86
<11.id IOVVll\&Jt

iv- (11ve the output of thl following cod


StrinF A '56 0 , 8 "94 0 ',
double c Doub I p,ir ~eoouble(A),
cioubl, D Ooublr parseDouble(B);
System out println((C+D)),
(a) ~G')40
(b) 150 0
(c) JSO
(d) 100 0

v What will be thr output of the following code?


.)ystcm.out pr1ntln( 'Robot1cs".substring(0,3));

(a) Robo
(b) obot
(c) Rob
(d) Robot
v1 Give output of the following String methods:
"SUCESS".indexOf( S') + "SUCCESS".lastlndexOf('S')

(a) 4
(b) 6
(c) -6
(d) 5

vii What value will Math.sqrt(Math.ceil(lS.3)) return?.

(a) 16 0
(b) 16
(c) 4.0
(d) 5.0
viii. The absence of which statement leads to foll through situation in switch case

statement?
(a) continue
(b) break
(c) return
(d) System.exit(O)

Ix String Is a:
(a) Character array
(bl Group of characters
(c) Data Type
(d) All of these

Page 2 Turn 0\er


Tl 86

I
%
\ \ "' ' l

\ ,snot
nlv if ,1 r wrn tYP
\ ' \I

ll i, l v lllU it I u~t d f r
wrn11 1 ,ult h,
l r
lit I
t corr ct
1111 1niR ,1
R)
on( is

Ill t "'d R ~ n (R ,~ not th

ted without passing


n Jn obJt: t rs rea

t ' l

4
11 ', th 1 )

~ nt l'\
m thods 1s med to convert a string to an integ er
X in the

~, I b the outpu t of the following code?


r 11.c;E
tr st sub 3
S tern out p ntln str quals CS l

p 1 urn o,cr
I If I 'I

I I II '" fl
t 111p11I I

I
\
\\I h ,\ ll

, i r, ii, I ,,, i I'


\\ h1d1 I lh I 'I \\ I 1 I I ll
I ,,, ,I l ,11

I 1111 r ' < I I h1 ( I I


11
( 1 A I 11tc 1111l I m nly lH ll 1 1 d lly '
tlA \ lt VHI 1blt I llllllllll Ill I ,l h (I ,)JI l t l) r 111 pflltCt
',, I 1,•
1
()A t it \ 11, 11 , .. 11.11 rt 11np11 ,111111 ,t ,ru •

(d) A t J\I \ II I 1l>ll ,1111101 lJ 111111111 ( cl


111
\ \\I Ill( h j l\i I I Ill( 1pll I cf Pl led Ill th f 1IIC1Wlllf' f11' I

GJ Class
M ti

(.1) In her tt,rnc.e


(bl Polymor ph1s111
(c) D.1ta Abstr,1ct1011
(d) l.ncap~ulat,on
xvu (on~1d1.:1 the following todt• and JH~•1h111111• 0111p11t
inti] arr {5, 10, 15, 20, 2S};
for (mt 1 0,, <.. arr.length, 1H)
{
tf (drr[1] 15)
{
b1eak,
}
c;ystem out pnnt(arr[i] + "");
}

{a)"IOl"i
{b) 5 10
(c} 10 15
(d} S 10 15 20 25
Choose the con ect order of precedence
XVIII
(a)++,+, >, &&, (}
(b} (), ++, +, >, &&
(c) >, +, ++, &&, ()
(d) &&, >, (), ++, +

Page 4 I w11 <)vet


1 I 8h
lJ II r \( rlt II 1_

lnh rt for the. er e,H1 n of hr r arc.hies c,f cl<1


n II O
ll t d f s a class (Subclas ) to inherit Jt1rihutcs and
re: u C' rorn another c.lass (superclass) Thi'> promote code>
and a11 l
th b h ows for c.reat,on of pec1alized clc1ssec; and extem
c> tour of
a) Both A. ex1!".t1ng ones
<:!rt1on A)
nd
b) explanc:1t1on of A a Rea<,;on (R) are true and Reason (R) rs the corrc>ct
Both A s s rt1on {A)
rtion A) a d
correct expla n Reason (R) arC" true and Reason (R} is not the
(c. Assertion A nat,on of Asc;ert,on {A)
(d " ) 1 lru b t R
'"'SSert1on A 1 f u eac;on {R) 1s false
X al but RC'ason (R) 1s true
String X- l:> l
I
• int d nteg r va lueOf{x}. refers to
a) Autoboxing ---
b Unbox,n
c.) Assignment
(d) Syntax rror

QUESTION 2

Predict the out f


O
put the fo ll o wi ng code snippet
[2]
String a[J_ H1 • Hello", "Bye"},
int b-a(2] length(),

mt c=a length+a(lJ indexOf('e');


System.out print(b),
System out prrnt(c).

.u
Predict the output and show th e working .
[2]
mt a=S, b=l0, c=lS,
mtx a++* b++ + ++c.¾2 * 5
System out pnnt(x+" "+d+" "+b).

11J The following code snippet has an e rror in it . Nam e the type of the error and
Correct the code so that it compiles a nd run s correctly. [2]

String x "25",
mt y=double.parseDouble(x),
double r=Math.sqrt(y),
System.out print(r);

I { P es furn (her
2

A do bed 2
0 n be c;

ppet us ng ternary operator. (2)

Pred ct the o (2)

f
• Ic

ltuw
I I 1 It I y 11 tn I
Wiil thr f 0 n'
Ill I
11, w1nr. loop , ~• r ,, / Wh it v lu will tt r tur
(2)
rf 11

I t

11111 ( , ,,,
I I tu111 y

<ii CTION U

11 (/\n w r rmy four /tu t/C n from th, s,•, t/on)


111
h, 1
Wt t Ill I t J
II 111 hnu/d c " 1 1 I ti r,ro 1,m ,, tht r ,: lu
(
1
'
'nv,, '""''
11 /l((Jf(II)/ nt nr any /JIO(Jram nvIronn1 nt w11I Java o th IJo
hCJJ/J/ d
r. J Wrttt n 1.1 111q vano/JI d rr,pt1on / rr r, n on1<. lo 0
th<Jt th lor11 of lh f}tO(Jram I I arfy d r,ru d
11 flow, hort oncl ol(Jar,thm a, not r q111r d
I ft r, (II' Hit r I f1£1ta lriput \tr, wn I, >tJ/d not IJl 11 , rl ,nth, proqram'

QIJI ',l fUN 3 [15]

lh f,nl I cl 1 • to 1c pt 10 th,tt H:t1 r from ,1 u r>r U lllf' bubbt,-. ,ort tuhn,qu


111 111r1 th, 111111 , , t 11d1np ord r Di.plt1y thr .ortcd .irrc1y ,ind or1ein,1I arra1

QUfSIION.11
[15)
D(•f 11,, • , ( I 1 •• to ovt r lo.id th f u nc.t10n print ,1 follows
void p, 1111() to print tlu follow,np forrn,,t
1 J 1 I
) 7 ). )
{ 3 { ~

4 '1 ll 4
,, r, r> ,,
VOid pt tilt ( In l
1 0 check wlwthf'r the number 1!. a lead number t lt•ad number 1s
ll )
tlw onP who.,c Unl ,~
"'vrn Or
d1g1ts Me equ.il to sum of odd d1g1ts

C' G 1GG()
oddcl1p,1tc, um 3, 9 12
l Vf'll cl1r,1ts <urn 6 ♦ G ]2
-i669 ,,, ,i lcild nurrilwr

l'a •i.:: 7 I urn Cher


I I 8(1
(15)
QU£STION 5

dit

a= p (l+r/100)

Pr n 1p I Tim Rte Amount

XXX XXX XXX XXX

QUESTION 6 (15)

b th u fr m th h t f valu

oth

11 8 5'1 1
QUEsnoN 7
Der inl! a rldss l
011
... I O ,lC( C'J)t " ', t I 111 111(! !)fl (15)
l c.l1c;plily ti rt lh 1111 I
c ie Ill w Iring I r t
cha1c1ctC'r,3r,f >yr IIJ 111 h lly r 11
nd 111 ' c l'vcry Co11so11c111t liy 11, I i

r , the sa rne pr vrou d1 uc1 t r T I t, r


Lxdrnplc- Input. llello World
Output GI MMp XPSME

QUESTION 8
(15)

Deline a class to accept values into 4x4 array and find and d11play th sum of
each row and each column.

Example

All 11-{l,2,3,4},{S,6,7,8}, {1,3,5,7),{2,5,3,]}}


Out nut:
sum of row 1 =10 (1+2+3+4)
sun1 of row 2= 26 (5+6+7+8)
sum of row 3=16 (1+3+5+7)
sum of row 4= 11 (2+5+3+1)
sum of col 1 =9 (1+5+1+2)
sum of col 2= 16 (2+6+3+5)
sun, of col 3=18(3+7+5+3)
sum of col 4= 20 (4+8+7+1)

*** ***** * ******* *

Page 9 I urn O,er


11 8(1

You might also like