icjecapu14
icjecapu14
icjecapu14
Sample Paper 14
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) Given s = “123”, which of the following options correctly converts it into an integer?
(a) int a = integer(s) (b) int a = int(s);
(c) int a = parseInt(s) (d) int a = Integer.parseInt(a);
(iii) Which of the following functions is used to check if a given character is a tab space?
(a) is Tab () (b) is Tab Space ()
(c) is Space () (d) is White Space ()
(vi) Which statement causes program control to return to the caller of the method?
(a) return (b) jump
(c) selection (d) iteration
(ix) Which of the following is essential in a program for documentation or explanation purposes?
(a) Comments (b) Blocks
(c) Statements (d) Variables
(xii) The term _____ refers to the ability to take on multiple forms.
(a) inheritance (b) polymorphism
(c) literal (d) encapsulation
(xiv) What is the term used for changing one data type to another?
(a) Comment (b) Block
(c) Variable (d) Type casting
(xv) A/An _____ can access all fields and methods of a class.
(a) class (b) variable
(c) data type (d) object
(xvii) Assertion (A) : Local variables are declared within a method, constructor, or block.
Reason (R) : Local variables are not accessible 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.
(xviii) Read the following text and choose the correct answer:
Java streams allow functional-style operations on sequences of elements. A stream is an abstraction that
applies a series of functions to data in a specific order without modifying the data itself. Unlike collections,
a stream does not store elements directly.
Which of the following stream contains the classes which can work on character stream?
(a) Input Stream (b) Output Stream
(c) Character Stream (d) All of the mentioned
(xx) Which method of the String class is used to compare two string objects for equality?
(a) equals( ) (b) Equals( )
(c) is equal( ) (d) Is equal( )
QUESTION 2.
(ii) Examine the following code and determine how many times the loop will execute:
int sum=0, score = 0;
double t;
do
{
score = score +1;
(iii) Identify the error(s) in the following code and underline the correct parts:
int m=4; n=10;
while(n>=1)
{
System.out.print(“m”);
n-;
}
(iv) When the value of a = 8 than find the value of th following expression a–= + + a +a++ +4 – a+6.
(vii) Write the values of r and s after the execution of the following code.
int p=11, q=21, r, s;
r=++q;
s=p++;
r++;
(viii) Write the Java statement for the following mathematical expression
p = a2 + b2
b a
SECTION B
Attempt any four questions from this section.
QUESTION 3.
A class named DeciOct is defined to convert a decimal number into its corresponding octal representation. The
details for some of the members of this class are provided below.
QUESTION 4.
Thus, 13 is an emirp number. Design a class Emirp to check, if a given number is Emirp number or not.
QUESTION 5.
Define a class that declares an array of size 20 with elements of type double. Include methods to perform the
following tasks:
(i) Calculate and display the sum of all elements in the array.
(ii) Determine and display the highest value in the array.
Additionally, include functionality to accept elements into the array.
QUESTION 6.
3 4 5 5 5 ABA
23455 ACCA
1 2 3 4 5 ADFDA
QUESTION 7.
QUESTION 8.
Write a program that takes an input string from the user and calculates:
1. The total number of characters in the string.
2. The number of consonants in the string.
e.g. Input Enter a string : Hello
Output Total number of characters: 5
Number of consonants : 3
******