icjecapu09
icjecapu09
Sample Paper 09
ICSE Class X 2024-25
COMPUTER APPLICATIONS
Time: 2 Hours Max. Marks: 100
General Instructions :
1. Answers to this Paper must be written on the paper provided separately.
2. You will not be allowed to write during the first 15 minutes.
3. This time is to be spent in reading the question paper.
4. The time given at the head of this Paper is the time allowed for writing the answers.
5. This Paper is divided into two Sections.
6. Attempt all questions from Section A and any four questions from Section B.
7. The intended marks for questions or parts of questions are given in brackets [ ].
SECTION A
Attempt all questions from this part.
QUESTION 1.
Choose the correct answer and write the correct option.
(Do not copy the question, write the correct answers only.)
(i) Which of the following could cause the Java compiler to report a syntax error in a specific line of a program?
(a) The program is typed in the wrong font.
(b) The line contains a comma(,) instead of a dot($).
(c) It is caused by Java runtime.
(d) Program takes too long to complete.
(iii) If the condition ((a > b) && (a > c)) is true, which of the following statements is correct?
(a) a is the largest number. (b) b is the largest number.
(c) c is the largest number. (d) b is the smallest number.
(xii) Which class is used to convert a primitive data type to its corresponding object?
(a) String (b) Wrapper
(c) System (d) Math
(xiv) What data type is returned by the equals() method of the String class?
(a) Char (b) Int
(c) Boolean (d) All of these
(xvi) What value does the compare To() function return if the invoking string is less than the string it is compared
to?
(a) Zero (b) Value less than zero
(c) Value greater than zero (d) None of the above
(xvii) Assertion (A) : JVM is a Java interpreter loaded in the computer memory as soon as Java is loaded.
Reason (R) : JVM is different for different platforms.
(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.
(xviii) Read the following text and choose the correct answer:
Java constructor overloading allows a class to have multiple constructors with different parameter lists. The
compiler distinguishes these constructors based on the number and types of parameters provided.
Why do we use constructor overloading?
(a) To use different types of constructors.
(b) Because it’s a feature provided.
(c) To initialize the object in different ways.
(d) To differentiate one constructor from another.
(xix) Assertion (A) : Class initialization is the explicit initialization of class fields to values.
Reason (R) : Each class field explicitly initializes to a value via a class field initializer.
(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.
(xx) Which access specifier allows access only by subclasses in other packages or any class within the same
package?
(a) Protected (b) Private
(c) Public (d) Default
QUESTION 2.
(i) State the number of bytes and bits occupied by an int array of 20 elements.
(iii) Write the value that will be stored in variable a after execution of the following code, if a = 12.
int b=10;
if(a>b)
a=a-3;
a = a * 2;
System.out.println(“a=”+a);
(v) What will be the values of i and z after the following code executed?
int i = 5, z = 15;
do {
i = i + 3;
z--;
} while (i < 20);
(vii) Write the Java statement for the following mathematical expression :
s = ut + 1 at2
2
(ix) What will be the result of the following two expressions, if x=20 initially?
(a) ++x<=20
(b) x++<=20
SECTION B
Attempt any four questions from this section.
QUESTION 3.
QUESTION 4.
Define a class MergeDesc to take two sorted arrays as input, merge them into a single array, and display the
merged array in descending order.
Example:
Input:
Output:
QUESTION 5.
Write a program to input 15 integers into an array and sort them in ascending order using the bubble sort
algorithm.
QUESTION 6.
Write a Java program to copy all elements from one array to another.
Example:
QUESTION 7.
QUESTION 8.
A disarium number is a number where the sum of its digits, each raised to the power of their respective positions,
equals the number itself.
e.g. 135 = 11 + 32 + 53
******