ARYAVIDYA MANDIR GROUP OF SCHOOLS
Std: X PRELIM REVIEW-January 2025
Computer Appl
Date: 04.01.25
Marks: 100
COMPUTER APPLICATION Time :2 Hrs
Note: You will NOT be allowed to write during the first 15 minutes.
This time is to be spent in reading the paper.
Thetime given at thehead of this papcr is the time for writing the answers.
Thepapcr is divided into twO sections. Answer all qucstions from section A and any 4 Irom
section B. Section A is of 40 marks and section B is of 60 marks. Marks for each question is
mentioned in[ ]to your right. This paper consists of 8 printed pages.
SECTION A(40 marks)
Answer all questions
Question 1
Choose the correct answer and write the correct option [20]
Securing class data
PuOyiteuet,1)
OprivaAale
Goprie
rual.,
(eJpdornt)
Encacylatlon
pblast.)
Name the Java access specifier depicted in the above picture.
a) public
b) private
c) protected
d) default
i. Unicode is a bit character set
a) 8
b) 2
c) 16
d) 256
ii. Assertion (A): Aloop inwhich there is no statement associated in its
body iscalled as an infinite loop.
Reason(R):In the infinite loop the test condition will always be true.
a) Both Assertion (A) and Reason (R) are true and Reason (R) is a
correct explanation of Assertion (A)
b) Both Assertion (A) and Reason (R) are true and Reason (R) is
not acorrect explanation of Assertion(A) ...2
c) Assertion (A) is true and Reason (R) is false.
d) Assertion (A) is false and Reason (R) is true.
iv. If x =9, find the value of
x*= (-xx++) + ++x- (x--%x:
a) 18
b) 108
c) 90
d) 20
V. Given a string str="Publicaccess";
lo display the 3rd and 4th characters in uppercase the statement
will be :
a) System.out.printin(str. substring(2,4).toUpperCase);
b) System.out.println(str.substring(2,3).toUpperCase));
c) System.out.println(str.substring(2).toUpperCase();
d) System.out.printin(str.substring(2,3).touppercase));
vi.
Assignment operator is associative.
a) left
b) right
C) a and b both
d) none
vi. If you use the compareTo()function to compare two
string is greater than the second one, the function will strings,
return
and the first
a) avalue that is greater than zero
b) a value that is less than zero
C) zero
d) equal
vi. What does the expression float a = (35-20) / (20-20) return?
a) 0
b) Not a number
c) infinity
d) run time error
0x. What is the output of the below javacode?
int bat] ={}:
System.out.print(bat. length);
a) 0
b) -1
c) 1
d) Compiler error
X. An identifier is the name given to
a) Variable
b) Method ..3
-3
Std XComputer App Prelim Review
January 2025
c) Class
d) Allof these
xi. State the output of the given code:
int i, n=1;
for(i =1; i>=5; it+)
n=n*i;
System.out.printin(it"" +n);
a) 6,120
b) 1,1
c) Infinite loop
d) Compiler error
xii. What is the output
double d = 858.48
String s= String.valueOf(d);
int dot = s.indexOf( . ");
System.out.println(s.length( )+ +dot);
a) 5 3
b) 6 2
c) 6 3
d) 5 2
xiii. Assertion (A): A logical operators can be used to join more than one
relational expression.
Reason(R):Logical operators are binary in nature.
a) Both Assertion (A)and Reason (R) are true and Reason (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.
xiv. is a composite datatype.
a) int
b) user defined data type
c) Arrays
d) Both b and c
XV. Variable which maintains independent copy of every object is:
a) instance
b) static
c) local
d) argument
Xvi. Predict the output:
boolean f=true;
if(!f) ...4
System.out.printin():
else
System.out.printin(!);:
a) true
b) false
c) syntax error
d) None of these
xvii.
What is the data type of the argument given in startsWith() method of
String class?
a) int
b) boolean
c) String
d) No argument is provided
xvii. In object oriented programming, the stress is
a) Procedure given on:
b) Method
c) Class
d) Data
Xix.
Arrange the given literals on the basis of theirsize from lower to
1. n' higher.
2. true
3. 14.78f
4. 34
a) 1,2,4,3
b) 2,1,3,4
c) 2,1,4,3
d) 3,4,1,2
XX. Which of the following is the CORRECT statement to invoke the
with the method
prototype int display(int a, char ch)?
a) int m =display('A', 45);
b) int m= display(45,A);
c) int m=display(A,45);
d) int m = display(45, A');
Question 2:
(20]
i. What will be the output?
int a=12010; [2]
int d;
while(a>0) {
d=a%100;
if(++d/3==0)
break;
else
a=a/1000;
System.out.println(d); } ....5
5
Std XComputer App Prelim
Review January 2025
The followingcode segment should
the array and displays the answer asadd the fifth and eight elements of (21
Fix the code so that it 56. However, the code has errors.
of the given code. compiles and uns correctly. Also name the eror
int s=(2.22,3,32,4,42,5,52):
if(s(3)%2==0)
int sum=s[5]+s[7]:
System.out.printin(sum):
Rewrite the followingprogram segment using
char code: switch-case (2)
if(code == B||Code =='b')
System.out.printn
if(code (Businessman'):
=='F|| code == f)
System.out.
if(code ==
printn(Fighter):
'E|| code ='e')
System.out.printin(Employee);
iv. Wite the output of the given statements :
(2]
"EXPRESSION".substring(0,3) :
"EXPRESSION".substring(3):
V. Write a java statement to store marks of two students in 3 subjects in a (2]
double dimensional array
Student1: 74,50,90
Student2: 65,89,69
vi. Wite a Java statement for the given expression: (2]
Vlyl(a +b)3
vii. Cyber police wanted to investigate a case: they wanted to check a list of [21
phone numbers that had 965 anywhere in the phone number.
Example: 7396579383, 7682721965,. method was created to
convert the phone number in long data type to a string and check for the
existence of the number 965.
Fillinthe blanks (a) and (b) in the given method with appropriate Java
statements:
void check (longpno)
String s= (a)_
if( (b)
System.out.printn(pno);
vii. Consider the array
int n[={12,35,40,22,56,9,70);
....6
ITne above given array is arranged in descending order, how many
iterations are required to checkfor the existence of value 12 uSing
linear search? Also print the size of the array in bits?
ix. Name the following: (21
a) Methodthat stops the execution of a java program at any stage.
D) Ateach stage, compares the sought key value with the key value
of the middle element of the array.
X.
Give output of the given code and convert and rewrite it using do -while [2]
loop
String s= "Hope";
for(int i=0;i<5;i++)
if("AEIOUaeiou". indexOf(s.charAt(i)>=0)
System.out.print("$'
else
):
System.out.print(s.charAt();
Section B (60 marks)
Attempt any four questions from this section. Each program should be
written in such a way that clearly depicts the logic of the program. This
shouid be achieved by using mnemonic names and comments in the
program. Also give description of variables.
Question 3: [15]
Define a lass Grade _Revision having the following description:
Instance Variables/Data Members:
String name -to store name of an employee
int bas- to store the basic salary
int expn - to store the years of service as experience
double inc - to store the increment
double nbas - to store the new basic salary (basic+increment)
Member Functions:
Constructor - to intilalize name, bas, expn to their default values.
void input () -to accept input for name, bas and expn.
void compute () - to calculate the increment with the
followingspecifications.
Experience Increment
Up to 3 years 1.000 + 10% of basic
More than 3 years and up to 5 years 3,000 + 12% of basic
More than 5 years and up to 10 years 5,000 + 15% of basic
More than 10 years 8,000 + 20% of basic
Finally calculate the new basic salary as basic + Increment.
void display () - print all the details of an employee.
Write a main () method to create an object and call the functions. ...7
-7
Std X Computer App Prelim Review January 2025
Question 4:
[15]
student appearing for the ICSE or ISC
A examination will be given an
index number.
Which is of the following format:
Number of 7 digits/number of 3 digits.
The first digit represents ICSE(1) or ISC(2), the next two digits
represents the year, the next four digits represent the centre number,
the last three digits represents the index number.
Example:
124311/204
Output:
Class: 10
Year :24
Centre number: 4311
Index number: 204
Example: 2259856/107
Output:
Class : 12
Year:25
Centre number: 9856
Index number: 107
Define a class to accept the student index number as string and print
his/her details as above.
Question 5: [15]
Define a class to overload a function Output( )
void Output(Sting, String)
accept two strings of same length and form anew word in such a way
that,
the first character of the first word is followed by the first character of the
second word and so on. If the strings are of different lengths print
"Wrong Input"
Example:
Input string 1- BALL
Input string 2 - WORD
OUTPUT: BWAOLRLD
void Output()
get the output using nested loop
12345
23456
34567
45678 ...8
56789
-8
Std X Computer App Prelim Review January 2025
Question 6: [15|
A number is called an Adam number if the square of a number and the
Square of its reverse are reverse to each other.
Adam Number Example:
Consider a number (N) 12 and check it is an Adam number or not.
Square of the number (N)=144
The reverse of the number (N) = 21
Square of the reverse of the number (N) = 441
We observe that the square of 12 and the square of its reverse i.e. 21
are
reverse of each other. Hence, 12 is an Adam number.
Question7: [15]
Write a program to create a matrix of n rows and m columns. Store
characters in it.
Print the greatest character of each row based on their ASCIl value.
Example:
n=3 and m=4
4 a 8 A
T+3$
#h }G
Output:
1 row: a
2row: T
3 row:}
Question 8: [15]
Write a program to accept the names of countries and their player
names in two single dimensional arrays of string types.
Arrange the list in ascending order of country names. Using selection
sort technique.
**********AL| THE BEST**********