Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

CBS, Computer Applications

This document is an examination paper for Class X Computer Applications with a maximum score of 100 marks and a duration of two hours. It consists of two sections: Section A, which includes multiple-choice questions, and Section B, which requires programming tasks. Students are instructed to write their answers on provided paper and spend the first 15 minutes reading the questions.

Uploaded by

yshreyas12
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

CBS, Computer Applications

This document is an examination paper for Class X Computer Applications with a maximum score of 100 marks and a duration of two hours. It consists of two sections: Section A, which includes multiple-choice questions, and Section B, which requires programming tasks. Students are instructed to write their answers on provided paper and spend the first 15 minutes reading the questions.

Uploaded by

yshreyas12
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Caleutta Bors' thool

CLASS X

COMPUTER APPLICATION
Maximunm Marks 100
Time allowed Two hours
Answers to this Paper must be written on the paper provided separately
Youwill not be allowed to write during the first I5 minutes
This time is to be spent in reading the question papper.
The time given at the head of this Paper is the time allowedfor writing the answers.
This Paper is divided into two Sections.
Aitempt all questions from Section Aand any four questions from Section B.
The intended marks for questions or parts of questions are given in brackets |/
SECTION A
(Attempt all questions from this Section)
Question 1 [20]
Choose the correct answer and write the correct option.
(0) Conversion of a wrapper class to its corresponding primitive type is called
la) Unboxing
(b) Autoboxing
(c) Parsing
(d) Type casting

() The method to convert aString to float in Java is:


(a) String.toFloat()
b) Float.parseFloat()
(c) Float.ParseFloat()
(d) None
(i1) Which of the following is a valid array declaration to store names of 10 students

(a) String s[]=[10];


(b) String s=new String[10];
c) String []s=new String[10];
(d) None

(iv) In a binary search technique, the elements of the array are needed to be first.

(a) doubled
(b) deleted
(c) compared
sd) sorted

Page 1 of 7
CBS- Pre-Board Examination 2025
andi
he will store the names
t xn ,t d t sirNiute vie should he use?
stuture
at* 0Nye hs Noe WhNh sungle data

arqument/arquments?
Ah tN fokovgSthg methos can have nteger

sust)

Axwrt tuntvy Is a tyjv of


Ras n ava e fuNton can be Ixolynorphism,
detined n multiple ways.
() AsNt ani rvsY hare tue.
b) AssYtn s true,
Nsns false.
AsSNtnis false wson is true.
() Rth assertion and rvson are false.
Whch ot the tollving is a valid
initalization statement ?
(a) nt =45.02:
() String s='a:
(c) int true=false:
) None of the above.
() Which data structure does the following picture
represent ?

(a) 1Darray
(b) 2D array
(c) Loop
(d) Cass

() What will be the output of the following code -


for( int i=0;i<10;1+ +); System.out.print(float(i"i));
(a) 81 (ftoat)ioi
(b) 81.0
() 100.0
Jes Error
(xi) Ramesh is the father of Suresh. Suresh has two sons, Viresh and Jiresh. They have some similarity
with
Ramesh. Which feature of OOP does it represent?

(a) class
b) Inheritance
() Data abstraction.
(d) None of these

Page 2 of 7
CBS- Pre-Board Examination 2025
(xii) int x =Integer.
(a) parseLong (347");
(b) valueOf
(c) toString
(d) None of these
(xii) Bony wants to find the
the appropriate Java modulus of the product of two numbers (a and b)when
expression. dividing with /. Se
(a) a%7 * b%7;
(b) (a+b)*7%10;
lef (a*b)%7
(d) None of these

(xiv) The output of the statement Math.abs ( Math.ceil (-6.5 ) )is


(a) 7
(b) 7.0
(c) 6.0
(d) 6
) Rahul performs selection sort on { 7,2,6, 1 } to arrange the elements in deseenig order. The
elements after the first pass would look like
(a) {7,1,6, 2 }
(b) { 1,2,6, 7 }
(c) {1,7,2, 6}
(d) {2,7,6, 1 }
(xvi) The output of the statement "RAMBO.indexOf(r); is

(a) 0
b) -1
(c) 5
(d) none

(xvii) Assertion:A class can have multiple constructors.


list.
Reason: Multiple constructors are defined with same set of parameter
(a) Assertion is correct but reason is not correct.
(b) Assertion and reason both are incorrect.
(c) Assertion is incorrect but the reason is correct.
(d) Assertion and reasSon both are correct.
loop
(vi) Identify which of the following codes leads to an infinite
(a) for (a =10 i; a-- )
(b) for (a = 1; a <=10;;)
(c) for(a =1;a > 0; a-- )
(d) Only option a and b

Page 3 of 7

CBS- Pre-Board Examination 2025


conversion?
example of explicit
(1x) Which of the following|piece of code is an
(a) int a 10,5;
(b) int a- Integer.parseInt ("10";
(c) int a int(40.5);
(d) both options b and c
(x) Ihe output of the Java statement "SOLUBLE".compareTo("SOLUA") IS

(b) -1
(c) 2
(d) None of these
Question 2
()Write the values of c and dafter execution of following code. [2]
int a= 1;
int b = 2;
int c;
int d;
C= ++b;
d =at+;
C++;

()) Observe the following code and write how many times will the loop execute? [2]
a= 5;
b= 2;
int r;
while(b != 0)
r=a % b;
a = b;
b=r;
System.out.printin(" " + a);

(i)Write the Java expression for (p + q) ? [2]

(iv) Evaluate the expression when the value of x = 2: x x + +t+ [2)

(v) Write the values that will be assigned to x, y and t after executing the following code. [2)
String s1, s2, x, y;
int t;
S = "classxii";
s2 = "cbseboard";
x =s1.sutbstring(5, 8);
y= s2.concat(s1 );
t= y.length();
System.out.printin("x=" + x);
System.out. printin("y=" + y);
System.out.printin("t=" + t);

Page 4 of 7

CBS- Pre-Board Examination 2025


(vi) Name the following :
(a) A sorting method where shertn frt
cOnsecutive clements are NOT COmpared.
(b) Scanner class method to
accept a charater clement.
(vii) A teacher wants to check the number of
students whose name end with "DAS.
Fill the blanks in the qiven program segment with
appropriate Java statements.
void total (String st[])
{ int i , |= Count =0;
for (i=0;i<l;i+ +) {
if ( )
Count++; 1f

System.out.printin(count);
(Vii) Mention how many times the qiven loop is executed and qive output of the Same.
for (inti= 10;i<=20; i+=3 )
{if (i% 4 = =0) continue; System.out.println(i); }
(ix) Mention the two ways of invoking a function in Java.
(x)Write the differences between compareTo () and equals() functions in Java.

SECTION B
(Attempt any four questions from this Section)
The anSwers in this section should consist of the programs in either BlueJenvironment or any program
environment with java as the base.
Each program in this section should be written using variable description
Flowcharts and algorithms are not required.
Qlestion 3 [15]
Design a cdass EMPLOYEE with the following specification:
EMPLOYEE
Class name

Data Member
ename Tostore the name of an employee
age To store the age of an employee
basic To store the basicpay of the employee
mob To store the mobile number of an employee
net To store the final salary of an employee.

Member functions/ Methods


void accept() Toaccept the details (name, age, basiC pay,
mobile number of an employee) from the
user usingScanner Class only.

void calculate() Tocalculate the net salary as per the given


specifications:

Page 5 of 7
CBS- Pre-Board Examination 2025
pay
hra = 17% of basic
basic pay
da = 15% of
10% of basic pay
pf da) - pf
net salary (basic pay +hra +
number
basiC pay, mobile
void print() To print the name,employee
and net pay of an
functions. Define the
and member
Specify the class EMPLOYEE by qiving the details of the nember data class only
an object and call the functions accordingly to enable the task. Use Scanner
tO CTeate
to take the inputs from the user.

eestion 4 [15]

Design aclass to overload a function


(a) void pattern(int n)- It will take compared
as
one araumontfollows
as total: nuumber of line to print/execute the Tronowi9
pattern.

@$@SO

(b) void pattern() - It will print the following pattern.

Write a main function and create the object of the class. Call the member functions mentioned above from
the main through the object.
Question 5 [15]
Define a class to input 15 integer elements in an array and sort them in ascending order using the bubble
sort technique.

Question 6 [15]
Write a java program which will create atwo dimensional array (integer) where the size of the array is M>x M
[M is the total number of rows and columns of the array] and store the elements inside it. Perform the
following task -

Display the sum of odd numbers and product of even numbers present in the array.
,b. Display only the boundary elements of the array.
[Hint :Use Scanner class to take input from the User. Initialize the above array by using
new operator]

Page 6 of 7
CBS- Pre-Board Examination 2025
Question 7
Write a program to input a
alphabetical order. sentence. Count and display the frequency of cach [15]
Sample Input: COMPUTER letter of the sentence m
Sample Output: APPLICATIONS
Character
Frequency Character Frequency
A
2
2

C
p 3

1 R 1

L 2 1

M 1 T 2

N 1 1

Quéstion 8 [15]
Write a program in Java to print all Adam numbers between I and 100.
An Adam integer is a positive integer (without leading zeros) where the square of a number and the
square of its reverse are reverse to each other.

Example: Ifn 13 and reverse of 'n' = 31, then,


(13) =169

(31) = 961 which is reverse of l69


thus 13, is an Adam number.

Page 7 of 7
CBS- Pre-Board Examination 2025

You might also like