0% found this document useful (0 votes)
35 views

icjecapu02

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)
35 views

icjecapu02

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 02 Page 1

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

(i) Give the result produced by executing the following code.”


String str1 = “Information
Technology”;
String str2 = “information
technology”;
boolean p =
str1.equalsIgnoreCase(str2);
System.out.println(“The result is
” p);
(a) True (b) False
(c) Error (d) Cannot define

(ii) Which of the following is an advantage of using arrays in Java?


(a) Random access (b) Code optimization
(c) Both (a) and (b) (d) Size (no limit)

(iii) Which of the following serves as the universal class for exception handling?
(a) Objects (b) Errors
(c) Exceptions (d) Maths

Continue on next page.....

Install NODIA App to See the Solutions.


Click Here To Install
Page 2 Sample Paper 02 NODIA

(iv) What will be the output of the following Java program?


class String_demo
{
public static void main
(String args[])
{
int ascii[] = {65, 66, 67, 68};
String s = new String(ascii, 1,3);
System.out.println(s);
}
}
(a) ABC (b) BCD
(c) CDA (d) ABCD

(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

(viii) The time complexity of the linear search algorithm is_____.


(a) O(n) (b) O(logn)
(c) O(n2) (d) O(n logn)

(ix) This is a group of similar type of classes.


(a) package (b) void
(c) extends (d) import

(x) trim( ) is used for_____.


(a) Remove leading and trailing spaces in a string (b) Removes character
(c) Shorten string (d) None of the above

(xi) Choose the odd one


(a) if-else (b) if
(c) switch case (d) while()

Continue on next page.....

Install NODIA App to See the Solutions.


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

(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

(xiii) Array data access using_____.


(a) operator (b) index
(c) variable (d) pointer

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

(xix) Java source code is compiled into_____by Java compiler.


(a) byte code (b) JVM
(c) Java interpreter (d) JRE

Continue on next page.....

Install NODIA App to See the Solutions.


Click Here To Install
Page 4 Sample Paper 02 NODIA

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

(iii) If arr[ ] = {10, 20, 30, 40};


(a) What is arr. length?
(b) What is arr[1]?

(iv) Determine the output.


(a) a1 = “good”;
a2 = “bye”;
System.out.println(a1.concat(a2));
(b) s1 = “HELLO”;
s2 = “hello”;
s1.compareToIgnoreCase(s2);

(v) Determine the value of m after evaluating the following expression.


m+=10%++n+n++/ 4; when int m=12, n=3?

(vi) How many times the following loop will execute?


int n = 1, i = 1;
do
{
n + +;
i + +;
if(i = = 4)
{
n = 1;
break;
}
} while(i < 5);

(vii) What is the output of the following code ?


String s1 = “Sachin”;
String s2 = “Sachin”;
if(s1.equals(s2))
System.out.println(“s1 is equal
to s2”);
if(s1= = s2)
System.out.println(“s1 and s2
are equal”);

Continue on next page.....

Install NODIA App to See the Solutions.


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

(viii) Determine the number of bytes and bits used by an integer array with 5 elements.

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


String s = “Unity\n In\n
Diversity\tIndia”;
System.out.print(s);

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

e.g. 145 = 1! + 4 ! + 5! =1 + 24 + 120

Design a class Special to determine if a given number is a special number or not

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.

Write a menu-driven program using a switch statement.


(i) To print the Floyd’s triangle
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
(ii) To print the Pascal triangle
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1

Continue on next page.....

Install NODIA App to See the Solutions.


Click Here To Install
Page 6 Sample Paper 02 NODIA

QUESTION 6.

Write a Java program to print following patterns using switch case:


(i) 5 4 3 2 1 (ii) A A A A A
5 4 3 2 BBBB
543 CCC
54 DD
5 E

QUESTION 7.

Write a Java program which entered a string by user and count the occurrence of number of characters present
in the string.

e.g. Input String HELLO

Output

The character E has occurred for 1 time

The character H has occurred for 1 time

The character L has occurred for 2 times

The character O has occurred for 1 times

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.

e.g. Input : Aarav will buy a ball and bat tomorrow

Output : 4

******

Install NODIA App to See the Solutions.


Click Here To Install

You might also like