0% found this document useful (0 votes)
9 views11 pages

computer

The document outlines the first terminal examination for the Computer Applications subject for Std. X at C.N.M. School & N.D. Parekh Pre-Primary School, scheduled for October 4, 2024. It includes instructions for the exam, the structure of the question paper divided into two sections, and various questions related to computer applications and programming concepts. The document also specifies the maximum marks and time allowed for the examination.

Uploaded by

kalpanaakamat
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)
9 views11 pages

computer

The document outlines the first terminal examination for the Computer Applications subject for Std. X at C.N.M. School & N.D. Parekh Pre-Primary School, scheduled for October 4, 2024. It includes instructions for the exam, the structure of the question paper divided into two sections, and various questions related to computer applications and programming concepts. The document also specifies the maximum marks and time allowed for the examination.

Uploaded by

kalpanaakamat
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/ 11

'l

§
C.N.M.& N.D.PAREICH
CW'lCHOOl

Shri Vile Parle Kelavani Mandal's


C.N.M. School & N.D. Parekh Pre-Primary School
STD DATE FIRST TERMINAL EXAMINATION TIME MAX
2024-25 MARKS
X 04.10.2024 COMPUTER APPLICATION 2 hours 100
Nwnber of printed pages - 11
Answers to this paper must be written on the paper provided separately.
You will not be allowed to write during the first 15 minutes.
This time is to be spent in reading the question paper.
The time given at the head of this paper is the time allowed for writing the answers.

This paper comprises two sections: Section A and Sectioh B


Attempt all the questions from S~c,.t;on A anfl Section B ~
l , . . ._

The intended marks for questions or parts ofquestio,ns are given· in· brackets [}.
,"
SECTION - A (40 ~arks]
Attempt all ques~,~s.
Question 1. Choose the correct answers to the questions,.from,:t~e given options. (20]

(i)

Method (x)

Method (x. v)

Method (x, v. z)

Identify the feafuJ::e of methods depicted in the above picture:


(a) Call by reference
(b) Function overloading
(c) Constructor overloading
(d) Pass by reference
(ii) The code obtained after compilation is known as:
(a) Source code
(b) Machine Code
(c) Object Code
(d) Byte Code

--------------------------------- ---------------------------------------------11
Std. X - Computer Applications First Terminal Examination-2024-25 Page 1 of
(iii) The output of the following is:
Character.islowerCase{'r');

Character.isletterOrDigit{'$');

(a) true and false


(b) false and error
(c) Zand false
(d) false and %
(iv) :pub lic clas s iter atio n
I{
pub lic stat ic void main ()
{
int a= 1;
:for ( a=i; a<=l O; a++) ;
- - ... - - - - - •
Sys tem .out .prin tln{ a);
\
I
}
Identify the error in the java program depi_c~~d above:
(a) Logical Error
(b) Compile Time Error
(c) Runtime Error
(d) Syntax Error
(v) State the type oflo~ p.in tjle given program snippet:
,,.,,... r . "
while{~~u~) ••• , ; _". ·
...,.
x++;
(a) Finite loop
(b) Infinite loop
,.
(c) Null loop ••
.(d) Fixed loop
(vi) What will .pe the value of:
Syste m.out .print{ Math. cbrt (Math.max {25.0, -49.0)
+ Math. floor{ l00.2) ));
(a) 5.0.
(b)-4.0
(c) -5.0
(d) -4.0

Std. X _ Computer Applic~ti~~ First Terminal Exam~~~ion-2~;~~;;-··---------------------------;~;


~·;-~f ii
'I) •
State the type of loop m . .
the given program sruppet:
char arr[]={'J'I 'A'I 'V'I 'A'}·I
int b=2·,
5Ystem.out.print(arr[b++]);

System.out.print(arr[b++]);
(a) VA
(b)A V
(c) JA
(d) N

(viii) The number of bytes occupied by a long value is:


(a) 1 byte
(b) 8 bytes
(c) 16 bytes
I•

(d) 32 bytes

(ix) The output of the following code is:


int l=l;

.,
int arr(]={2,5,6,7,8,9,10};
wh ile(i<arr.length-3)
{

~.. ~:. ...t.prin


System.ou ~ '
t(arr[i]+1};
, •'

arr[.H:1]++;
i++;

(a) 168
(b) 689
(c) 189
(d)-968.
help of an object.
(x) A - - - - - method needs to be called with the
(a) public
(b) instance
(c) class
(d) void

Page3 ofll
Std. X - Computer Applications First Terminal Examination-2024-25
(xi) · . is correct for the given if elst
Which one of the following conversion into equivalent ternary
if(nl>n 2)

r=true;

else

r=false;

(a) r=(nl& n2)? True: False;

(b) r=(nl>n2)? True: False;

(c) r=(nl>n2)? true: false;

(d) r=(nl<n2)? "true" : "false";

(xii) Predict the output of the following code snippet:

int Arr[) = {3,6,1,4,64,2,5,S,1, 7};

double x = Math.min(Math.pow(Arr[0],Arr[2]), Math.cbrt(Arr


[4]));
double y = Math.pow(MathJ"'ax(Arr[3],Arr[S]),Arr[6]);
System.out.print(x);

System.out.print(y);

/
(a) 3.01024.0
(b) 4.01024.0
(c) 3.04096.0
. ,·
(d) 4.04096.0

(xiii) Which java keyword indicates thaftbe function does not return anythi
ng?
(a) static
(b) void
(c) null
(d) public
(xiv) Assertion(A): When two or more loops are defined in a program,
it is said to be nested loop.
Reason(R): In a nested loop, the inner loop gets repeated each time the outer loop
executes.

(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correc
t explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a
correct explanation
of Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true
______________ , __
Std. X - Computer Applications First Terminal Examination-2024-25
Page 4 of 11
(xv) Read the following text, and choose the correct statement:
red with the same datatype. This is
An array is the concept of using a number of variables decla
the reason why an array is said to be a composite datatype.

Why is an array said to be a composite datatype?


(a) It uses primitive datatypes.
datatype.
(b) It uses a number of variables declared with the same
(c) It uses only one variable to store different datatypes.
(d) It uses same variables to store different datatypes.
(xvi) For the following code snippet choose the correct output:
int num =ll00 ; String str= "1100";

System.out.println(str.length( ));

System.out.println( num + num );

System.out.println( str + str );

(a) 2
11001100
11001100
(b) 4
11001100
..
2200 "

(c) 3
2200
11001100
(d) 4
2200
11001100

d.
(xvii) Assertion(A): Call by value method is known as pure metho
are perfonned
Reason(R): The original value of variables does not change as operations
on copied values.
(a) Both Assertion (A) and Reason (R) are true and Reaso
n (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not
a correct explanation

of Assertion(A)
(c) Assertion (A) is true and Reason (R) is false
(d) Assertion (A) is false and Reason (R) is true

---X--- ---Appli
---uter --------------------------
--cations·-------------------Exarn
Std. - Comp First Terminal ination-2024-25 Page S of 11
(xviii) Passwords are stored as two Strings:

one is the user entered password saved in String pw,

the other is a password stored by the system in String wp.


String wp
String pw

Password stored in the system


Password entered by the user

. pw must be checked
If String with
. String
. wp, for vaI'd' h' h one of the following String
1 1ty, w ic

functions are needed to be used?

(a) charAt()

(b) equalto( )

(c) equalslgnoreCase( )

(d) startsWith()

(xix) For the given code snippet, the output will be:

int a;

for( a= 15; a>=lO; a--)

System.out.println( );· _·
..,
:1:',(
System.out.println("a=" +:a);· J;..
•. ........ ❖
.· ... 'I:'.,,, ..•

(a) a=IS

(b) Compile time Error.··

(c) a=I0

(4) a=9

(xx) \1/}tlch of the following should be used to find the number of elements present in Cities□?
•• l

• . (a) Cities.length

(b) Cities.lengthO

(c) length(Cities)

(d) Cities.sizeO

Std. X - Computer Applications First Terminal Examination-2024-~;-----


Page 6 of 11
Question 2.
(i) Write the output of the following: [2]
String sl="ASIAN GAMES"·,
String s2="1T IS ALWAYS TOO SOON TO QUIT'';
System.out.println(s1.substring(0,3).concat(s2.substring(9)));
System.out.println((int)s2.charAt(6));
System .out. println(s2.replace('T', 'F') );
System.out.println(sl.charAt(sl.indexOf('C')+s2.indexOf('T')));
[2]
(ii) Rewrite the following using if.. else if.. construct:
switch(m)
{
case 0:
x=x+2;
System.out.println("X=" x);
break; .,
11 case 1:
x=x+4;
System.out.println("X=" x);
break;
case 2:
x=x+6;
• In("X=II x) ;
System.out.print
break;
}
[2]
(iii) Evaluate the given expr~ssion when the value of a=6 and b=9:
a * =---b + a-- - --b + a++;
[2]
(iv) Write the java expression for:
- lal-1/b
_.....,,_ _
Z - 2
m
How many times \V,µl the following loop execute? Write the output of the code: [2]
(v)
inti= O;
for(i = 1; i <=10; i++)
{
System.out.println(++i);
if(i++==S)
break;
}

(vi) Write a method prototype for a function terminal which accepts a integer and a character [2]
and returns true or false.

- - - -------------------------------------------------------------------------
Std. X - Computer Applications First Terminal Examination-2024-25 Page 7 of 11
(vii) Give the output of the following program segment and mention
how many times the loop
will execute:
int i = 1, k=l;
while(i++<G)
{
k*=i;
System.out.println(k);
}
(viii) Write the output of the following String methods: [2]
String A= "LoCkEt" .substring(0,4);

String B = "LoOk" .replace('O', 'C');

System.out.println(A);

System.out.println(A.compareTo(B));
(ix) Consider the following code and answer the question given below [2]
:
class Planet
{
static int x; int y;
void access (int z)
{
int a, b;
Planet Mars=nev,rPlanet ();
System.out.printl~(l(R.~d Planet");
}
a) What is the name of the object of the given class?
b) Name the instance variables used in the program.
c) Write the local variable used in the program.
d) The function in the given snippet is passing the argument using
the technique:
( 1) Pass by value
OR
. (2) Pass by Reference
(x) State the output of the following snippet: [2]
int m[]={9,25,17,5,44}; .
int m(0] =ll; m(l]= m(4]; int p=m[ 0]+m [l];

System.out.println(p );

doubl e y=Math.sqrt(m[0]+m[3]);

System.out.println(y);

-----------------------------------
Std. X - Computer Applications First Terminal E~amination-2024-25 Page 8 of 11
SECTION - B (60 Marks)
(Answer any four questions from this Section)
in BlueJ Environment or any other program
~e answers in this section should consist of the programs
written using variable description I mnemonic
envrronment with java as the base. Each program should be
Flowcharts and algorithms are not required.
codes so that the logic of the program is clearly depicted.
the programs.
Buffered Reader/ Data Input Stream should not be used in
[15)
Question 3.
Define a class with the following specifications:
Class name MutualFund
Member variables
double base to store the base amount invested
int n to store the duration of the investment in years.
double ror to store the rate of return
doublemv to store the maturity value of the investment
Member methods:
MutualFund( ) default constructor to initialize data members.
tment.
void input( ) to accept the base amount invested and the-duration of the inves
tions:
void compute( ) to compute the maturity val9e 6ased-dJ the following condi
Duration
<>
< Rate of return
l>

Upto 1 year 11%

More than 1 and upto 3 years 19%


More than 3 years 23%
Use the formula to calculate matunrity value:
mv = base(l + ror/100)

void print( ) display the details in the following format:


Base Amount Duration Rate of Return Maturity Value

methods.
Write the main method to create an object and call the above

(15)
Question 4.
each vowel by immediate next character and
WAP to create a code from the accepted string by replacing
remain unchanged.
each consonant by the previous character. The other characters
SAMPLE INPUT: **education@2020**
OUTPUT: **fcvbbsjpm@2020**

-----------------------------------------------
------------------- --- ------------------------------------------
Std. X - Computer Applications First Terminal Examination-2024-25 Page 9 of 11
Question 5.
· . llS \
Design a class Pron1c to . · •
check if an accepted nu ber or not. (A number
be Pronic if the product mber 1s a Proruc num 1s said to
of two consecutive numb . lf
ers is equal to the number
Example: itse •
0 =0 x l
2= lx 2
6= 2x 3
12 = 3 X 4
thus, 0, 2, 6, 12 ... are pro
nic numbers.

Question 6.
Define a class to overloa (15]
d the
method showO as follow
s:
void show Q: To print the
following pattern using for
loop.
• PARIS
PARI
PAR
PA
p

void show (int n, int x):


To print the sum of the fol
lowing series:
S=x1/1 ! + x2/2 ! + x3/3!
......x0 /n! up to n terms
. .
.
double display (double x,
double y, double z) - to
print the value of m where:
m = n *·l
x+ y
n=
z
l =x +y + z

Question 7.
Write a program to acce [15]
pt 6 elements in an array
R, containing all elements P, and 4 elements in an arr
of array P and Q. Display ay Q and produce a third arr
EXAMPI:,E: the resultant array ay
IN PU T
OUTPUT
P[ ] Q [] R []
4 19 4
6 23 6
l 7 l
2 8 2
3
3
10
10
19
23
7
8

--------------------------------
------------------------------
Std. X - Computer Applications •

First Terminal Examinatio



-- --------------------------------------
n-2024-25
Page 10 of 11
.,.t, "@ues ti'on 8. (15)

Foilowing is the COPA of the student who appeared for their college final semester.
7-6, 9.1, 8.2, 5.4, 4.3, 5.1, 6.6, 8.9, 8.0, 9.5
Design a class injava to accept the value from the user and find whether the accepted COPA is present in
the list or not. If it is found display the message "COPA found" otherwise display the message "COPA
not found".

••••••••••••••••••••••••••••••••

-------·------------------------------------------------------------------------------------------------------------------------------------------------
Std. X - Computer Applications First Terminal Examination-2024-25 Page 11 of 11

You might also like