Kisa Preparatory Paper Computer Applications
Kisa Preparatory Paper Computer Applications
Kisa Preparatory Paper Computer Applications
ICSE STD-X
Preparatory Examination 2023
Subject: Computer Applications
Date: 09-02-2023 Duration: Two Hours
_______________________________________________________________________________________
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 is divided into two sections.
Attempt all questions from Section A and 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
1
(a) Syntax error
(b) E
(c) e
(d) 69
2
xiv) Which of the following statement displays the 2nd element of an array x?
(a) System.out.println(x[2]);
(b) System.out.println(x[1]);
(c) System.out.println(x[3]);
(d) None of the above
xv) Name the type of error in the statement:
int x[ ]={1, 2, 3};
System.out.println(x[x.length]);
(a) Syntax error
(b) Run time error
(c) Logical error
(d) No error
xvi) The array float a[ ]=new float[5] occupies:
(a) 10 bytes
(b) 40 bytes
(c) 20 bytes
(d) 80 bytes
xvii) String s1="BASIC", s2="BASE";
System.out.println (s1.length ()+ s2.length());
(a) 10
(b) 9
(c) 8
(d) 11
xviii) The output of the method “Technology”.substring(4,10) is:
(a) Syntax error
(b) nology
(c) logy
(d) Runtime error
xix) A method with the same name as of the class and with arguments and no return datatype is termed as:
(a) parameterized constructor
(b) default constructor
(c) Non-parameterized constructor
(d) Wrapper class method
xx) String a="35", b="8"; int x=Integer.parseInt(a);
double y=Double.parseDouble(b);
System.out.println(x+y);
(a) 43
(b) 358
(c) 43.0
(d) 835
Question 2
3
iii) Rewrite the following using ternary operators:
if(sale>15000)
comm=sale*5.0/100;
else
comm=0;
v) How many times the following loop will gets executed? What is the output of the same?
for (inti=20; i>=2;i-=2)
{
if(i%4==0)
continue;
System.out.println(i);
}
ix) Consider the following program and answer the questions given below:
class record
{
static int m,n;
int z;
public static void show( )
{
m=25;
n=36;
}
public void display()
{ int h=27;
record sum=new record( );
}
}
(a) Name the class(static) and instance variables.
(b) Can the variable h be used in other functions? Give reason.
x) Consider the following array and answer the questions given below:
int x[ ]={2,4,6,8,10,12,14,16,18,20};
(a) What is the size of the array?
(b) What is the index position of 14
4
SECTION B
(Answer any four questions from this Section.)
The answers in this section should consist of the program in either BlueJ environment or any program
environment with java as the base.
Each program should be written using variable description/mnemonic codes so that the logic of the
program is clearly depicted.
Flowcharts and algorithms are not required.
Question 3:
Question 4:
Define a class to accept 20 students marks in a subject out of 100 in a single dimensional array and display the
number of students who have secured marks:
i) 90 and above ii) 40 and less than 40
Question 5:
Define a class to accept two string and convert both the strings to lowercase and display only the common
characters at the corresponding index position of both the strings only if both the string has same length.
Sample Input: s1=”heroic”
s2=”health”
Sample Output: h,e
Sample Input:
s1=”Device”
s2=”Demands”
Sample Output:
Strings length do not match
Question 6:
Define a class to input 10 words and arrange the words in descending order using bubble sort technique.
Display the sorted array.
5
Question 7:
Question 8:
Define a class to accept the years of graduation from a school as integer values from the user. Using Binary
Search technique on the sorted array of integers given below, output the message “Record exists” if the value
input is located in the array. If not, output the message “Record does not exist”.
[1982,1987,1993,1996,1999,2003,2006,2007,2009,2010]