icjecapu10
icjecapu10
Sample Paper 10
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.)
(v) Which search algorithm uses the middle value of an array to conduct the search operation?
(a) Binary (b) Linear
(c) Bubble (d) Selection
(vi) Objects that share the same attributes and behaviour are organized into a:
(a) Interface (b) Instance
(c) Alias (d) Class
(xi) Given array float Z[ ] = {15.5, 16.5, 17.5}; it will occupy _____ bytes in memory.
(a) 3 (b) 12
(c) 24 (d) 64
Continue on next page.....
(xii) If a single-dimensional array contains N elements, what will be the index of the last element?
(a) N (b) N – 1
(c) N – 2 (d) N + 1
(xiii) It can have the same access specifiers used for variables and methods.
(a) Method (b) Class
(c) Constructor (d) Object
(xiv) It is a Java program that extends the capabilities of a server and makes web pages dynamic in nature.
(a) Java applet (b) Java servlet
(c) Package (d) Java Archive
(xvii) Assertion (A) : next() can read the input only till the space.
Reason (R) : next() only gets to the line break.
(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:
The Java compiler breaks the line of code into text (words) is called Java tokens. These are the smallest
element of the Java program. The Java compiler identified these words as tokens. These tokens are separated
by the delimiters.
Java tokens help the compiler. Which of the following is a type of Java token?
(a) Identifiers (b) Keywords
(c) Operators (d) All of these
(xix) Assertion (A) : Identifier is a name given to a package, class, interface, method or variable.
Reason (R) : Identifier allows a programmer to refer to the item from other places in the program.
(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.
Continue on next page.....
(xx) A string function which removes the blank spaces provided in the prefix and suffix of a string.
(a) String.trim() (b) String.ltrim()
(c) String.rtrim (d) String.strim
QUESTION 2.
(i) Write code fragment to obtain a temperature value in degree Fahrenheit and display it in Celsius.
(ii) The following code has some error(s). Rewrite the correct code and underlining all the corrections made :
int i=0
do()
{
system.out.println(“i is: ”+i) i++;
}
while i<5
(v) Manju is studying in Computer class. She got a code to rewrite the following code into switch case. You
also do the same.
if(choice==1)
System.out.print(“First seat”);
else if(choice==2)
System.out.print(“Second seat”);
else if(choice==3)
System.out.print(“Third seat”);
else
System.out.print(“No seat”);
(ix) Write the Java statement for the following mathematical expression:
z = 5x3 + 2yx + y
SECTION B
Attempt any four questions from this section.
QUESTION 3.
Define a class to perform binary search on a list of integers given below, to search for an element input by the
user, if it is found display the element along with its position, otherwise display the message “Search element
not found”.
QUESTION 4.
QUESTION 5.
Write a Java program to print the following pattern using switch case.
1
1 2 *
1 2 3 * *
(i) 1 2 3 4 (ii) * * *
1 2 3 * * * *
1 2 * * * * *
1
QUESTION 6.
Write a program to input a number and check whether the number is an automorphism number or not.
An automorphism number is a number whose square “ends” in the same digits as the number itself.
QUESTION 7.
Write a program to enter a sentence from the keyboard and count the number of times a particular word occurs
in it. Display the frequency of the search word.
e.g.
Input : Enter the sentence :
Hello.. this is wow world
Enter the word :
wow
Output : Searched word occurs 1 times
QUESTION 8.
Write a Java program for linear search to check, if an element is present in the given list. If it is found then we
print the location at which it occurs, otherwise the list does not contain the element we are searching.
******