icjecapu02
icjecapu02
Sample Paper 02
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.)
(iii) Which of the following serves as the universal class for exception handling?
(a) Objects (b) Errors
(c) Exceptions (d) Maths
(v) What is the value returned by function compareTo(), if the invoking string is less than the string compared?
(a) Zero
(b) Value greater than zero (c) Value less than zero
(d) None of the above This concept is used to highlight key features
while omitting background details or explanations.
(a) Encapsulation (b) Polymorphism
(c) Inheritance (d) Abstraction
(vi) What is the process that allows control over which parts of a program can access a class’s members??
(a) Polymorphism (b) Abstraction
(c) Encapsulation (d) Recursion
(vii) Which class is inherited by the character and Boolean wrapper class?
(a) Object (b) Number
(c) Both (a) and (b) (d) None of these
(xii) Which of the following are non-executable statements that are ignored by the compiler or interpreter?
(a) Blocks (b) Variables
(c) Statements (d) Comments
(xiv) Which of the following loop checks the condition first before entering in a loop?
(a) while (b) do-while
(c) Both (a) and (b) (d) None of these
(xv) Assertion (A) : Local variables are defined within a method, constructor, or block.
Reason (R) : Local variables are not visible outside the method, constructor or block.
(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.
(xvi) Read the following text and choose the correct answer.
A class is a grouping of objects of the same type, where each object shares the same attributes and common
behaviors defined within the class.
What does a class?
(a) Takes different forms from one.
(b) Binds data and methods in a single unit.
(c) Hides the necessary details of the object.
(d) Shares common properties and relationship.
(xvii) This error is when your program compiles and runs, but does the wrong thing.
(a) Logic error (b) Runtime error
(c) Syntax error (d) Checked error
(xviii) Assertion (A) : Wrapper class is used to convert any primitive data type into object.
Reason (R) : To achieve call by reference, we use the wrapper class.
(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 but 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.
QUESTION 2.
(i) Write a statement to increase the value assigned to variable K by 2 and then to display the value.
(ii) Write the statement in Java for the following mathematical expression
p3 + q4 − 1 r
2
(viii) Determine the number of bytes and bits used by an integer array with 5 elements.
(x) What will be the output after executing the following code?
for(int i=4;i<20;i+=4)
System.out.print(“ ” +Integer
.toString(2*i));
SECTION B
Attempt any four questions from this section.
QUESTION 3.
A special number is defined as a number where the sum of the factorials of each digit equals the number itself.
QUESTION 4.
Write a Java program that prompts the user to enter the size and elements of an array. Then, ask the user to
enter a number to insert and specify the index position where they want to insert the desired element in the
array.
QUESTION 5.
QUESTION 6.
QUESTION 7.
Write a Java program which entered a string by user and count the occurrence of number of characters present
in the string.
Output
QUESTION 8.
Write a program to accept a string. Convert the string to uppercase. Count and output the number of double
letter sequences that exist in the string.
Output : 4
******