0% found this document useful (0 votes)
40 views6 pages

icjecapu10

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views6 pages

icjecapu10

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

ICSC Class 10 Computer Applications Sample Paper 10 Page 1

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.)

(i) Identify the output of the following code


String P = “19”, Q = “99”;
int a = Integer.parseInt(P);
int b = Integer.valueOf(Q);
System.out.println(a + “ ” + b);
(a) 1999 (b) 9919
(c) 9999 (d) 1919

(ii) The statement (1 > 0) | | (1< 0) evaluates to


(a) 0 (b) 1
(b) False (d) True

(iii) Errors in a program occur when:


(a) The syntax of the programming language is not followed
(b) The program fails to run properly or does not execute
(c) The program produces incorrect results
(d) All of the above

(iv) Give the output of Math. sqrt (x); when x = 16.0


(a) 4 (b) 4.0
(c) 4.00 (d) All of these

Continue on next page.....

Install NODIA App to See the Solutions.


Click Here To Install
Page 2 Sample Paper 10 NODIA

(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

(vii) The parameters passed to a method when it is invoked are called:


(a) Void parameters (b) Actual parameters
(c) Informal parameters (d) Formal parameters

(viii) Polymorphism is widely utilized in the implementation of _____.


(a) Inheritance (b) Encapsulation
(c) Abstraction (d) Literals

(ix) Consider the following code snippet


if (c > d)
x = d;
else
x = c;
Choose the correct option if the code mentioned above is rewritten using the ternary operator.
(a) x= (c> d)?c : d; (b) x= (c> d)?d : c;
(c) x= (c> d)?c : c; (d) x= (c> d)? d: d;

(x) Give the output of the following


switch(x)
{
case ‘M’ :
System.out.print (“Microsoft
Teams”);
break;
case ‘G’:
System. out.print (“Google Meet”);
default:
System.out.print (“Any Software”);
break;
case ‘W’ :
System.out.print (“Web Ex”);
break;
}
when x = ‘g’
(a) Google Meet (b) Any Software
(c) Google Meet (d) Web Ex

(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.....

Install NODIA App to See the Solutions.


Click Here To Install
ICSC Class 10 Computer Applications Sample Paper 10 Page 3

(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

(xv) What will be the output of following code?


String c = “Hello i love java”;
boolean var;
var = c.startsWith (“hello”);
System.out.println (var);
(a) True (b) False
(c) 0 (d) 1

(xvi) Which clause is optional in the switch statement?


(a) Default (b) Case
(c) Switch (d) None of these

(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.....

Install NODIA App to See the Solutions.


Click Here To Install
Page 4 Sample Paper 10 NODIA

(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

(iii) What will be displayed after the following code is executed?


int m=5;
if(m<10)
{
System.out.println(“m=”+m);
m++;
System.out.println(“++m=”+(++m));
}
else
{
System.out.println(“m”);
m++;
System.out.println(“m”);
}

(iv) Distinguish between compile-time polymorphism and run-time polymorphism.

(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”);

(vi) Given the following code fragment:


int a=15;
System.out.println(a++);
System.out.println(a);
What is the effect of replacing a++ with ++a?

Install NODIA App to See the Solutions.


Click Here To Install
ICSC Class 10 Computer Applications Sample Paper 10 Page 5

(vii) Find the output of the following Java code snippet :


String city=“Banglore”;
int t=city.length(), CT;
CT=200-t;
System.out.println(Integer.toStri
ng(t));
System.out.println(Integer.toStri
ng(CT));

(viii) Write a statement for each of the following.


(a) Store a number 275 as a string (b) Convert the string to a numeric value

(ix) Write the Java statement for the following mathematical expression:
z = 5x3 + 2yx + y

(x) Predict the output of the following code.


String str=“0123456789”;
System.out.println(str.substring
(4));

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”.

2, 5, 7, 10, 15, 20, 29, 30, 46, 50

QUESTION 4.

Design a class Hotel Booking with the following description :

Class name Hotel Booking


Instance variables/Data members
String name To store the name of the customer
String type To store the type of room that customer wants
Double mob no To store customer’s mobile number
Int amt To store basic amount of room
Int total amt To store the amount to be paid after updating the original amount
Member functions/Methods
Void accept() To take input for name, type, mobile number and amount
Void update() To update the amount as per the type selected (extra amount to be
added in the amount as follows)

Install NODIA App to See the Solutions.


Click Here To Install
Page 6 Sample Paper 10 NODIA

Type of room Amount


Full_AC 4000
Partial_AC 3000
Cooler 2000
Normal 1000
Void display() To display all details of a customer such as name,
type, total amount and mobile number.
Also, define a main() method to create an object of the class and call the above member methods.

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.

e.g. 52 = 25, 62 = 36, 762 = 5776

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.

******

Install NODIA App to See the Solutions.


Click Here To Install

You might also like