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

icjecapu12

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

icjecapu12

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

Sample Paper 12
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) Which of the following is a valid way to initialize a character?


(a) Character c=new Character(‘c’); (b) Character c=new Character(“c”);
(c) Character c= int new Character(“c”); (d) None of the above

(ii) Java array is a collection of_____.


(a) similar type of elements (b) different type of elements
(c) heterogeneous data (d) Both (a) and (c)

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


ANACONDA.replace(‘A’, ‘E’);
(a) ENECONDE (b) ANECONDA
(c) ENACONDA (d) None of these

(iv) Which of the following violates the principle of encapsulation?


(a) Public variables (b) Local variables
(c) Global variables (d) Array variables

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


class String_demo
{
public static void main(String
args[])

Install NODIA App to See the Solutions.


Click Here To Install
Page 2 Sample Paper 12 NODIA

{
char chars[] = {‘x’, ‘y’, ‘z’};
String s = new String(chars);
System.out.println(s);
}
}
(a) xy (b) yz
(c) zx (d) xyz

(vi) Library classes are______.


(a) a set of pre-defined classes (b) a set of used classes
(c) a set of user classes (d) All of the above

(vii) In Java, arrays can allocate ______.


(a) dynamic memory (b) static memory
(a) Both (a) and (b) (b) None of the above

(viii) Identify which of the following is not a keyword in Java:


(a) break (b) double
(c) integer (d) final

(ix) Which of these methods of class string is used to check whether a given object starts with a particular string
literal?
(a) ends() (b) endsWith()
(c) starts() (d) startsWith()

(x) In Java, packages can be stored in compressed files known as:


(a) JAR files (b) JVM files
(c) Java files (d) JRE files

(xi) Which access specifier should be used for a class to allow it to be inherited by a subclass?
(a) Public (b) Private
(c) Protected (d) None of these

(xii) What is the term for a class’s ability to inherit (or derive) the properties of another class, either fully or
partially?
(a) polymorphism (b) encapsulation
(c) inheritance (d) data abstraction

(xiii) Identify which of the following is not a wrapper class in Java:


(a) Byte (b) Int
(c) Long (d) Float

(xiv) Boolean literals represent how many distinct values?


(a) 1 (b) 2
(c) 3 (d) 4

Continue on next page.....

Install NODIA App to See the Solutions.


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

(xv) What types of constructors are available in Java?


(a) constructor with default arguments (b) parametrised constructor
(c) default constructor (d) All of the above

(xvi) Give the output of the following


int a=4, b=3, c=5;
int out=(b++)+c+(++a)+(++b)+(++c);
System.out.print(out);
(a) 17 (b) 16
(c) 19 (d) 24

(xvii) Assertion (A) : Jump statements can be used to modify the behaviour of conditional and iterative statements.
Reason (R) : When the break statement is encountered, the next iteration starts and the remaining
statements in the present iteration are skipped.
(a) Both Assertion (A) and Reason (R) are true and Reason (R) is correct explanation of Assertion (A).
(b) Both Assertion (A) and Reason (R) are true but Reason (R) is not 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.
Encapsulation is a technique that involves bundling data and methods together within a single unit. In Java,
this concept is applied by utilizing private and protected access modifiers, which restrict access to the data
within a class. This approach ensures that data remains secure and can only be modified through specified
methods, promoting controlled interaction and protecting the integrity of the information stored within the
object.
What is an encapsulation?
(a) Encapsulation is more about ‘How’ to achieve that functionality.
(b) Encapsulation is more about ‘What’ a class can do.
(c) It hides the unnecessary details of the object.
(d) Encapsulation focuses on the outside view of an object.

(xix) Assertion (A) : Pure functions define a relationship between input and output.
Reason (R) : Pure function does not depend on any state beyond its local scope.
(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.

(xx) Which of the following is also known as a compound statement?


(a) Jump (b) Selection
(c) Comment (d) Block

QUESTION 2.

(i) What is the purpose of the default section in a switch statement?

Continue on next page.....

Install NODIA App to See the Solutions.


Click Here To Install
Page 4 Sample Paper 12 NODIA

(ii) If x=5, find the value of x+=x++*2+ ++x%2*3+2.

(iii) Write the value that will be stored in variable num after execution of following code.
int num = 0;
for(int j=10; j>=7; j--)
{
if(j%3==0)
num = num+j;
else
num = num-j;
}

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


String word = “Highaltitude”;
String wordlc = word.toLowerCase();
for(int i=0; i<wordlc.length();
i+=4)
{
String extstr = wordlc
.substring(i,i+2);
System.out.print(extstr+ “ \n”);
}

(v) The following code has some error( s).


Rewrite the correct code and underlining all the corrections made :
int i;
i=10;
do;
i=i-4;
System.out.displayln(i);
}while i>=4;

(vi) Rewrite the following code using switch case statement:


if(value = = 1)
System.out.println(“Computer
Books”);
else if(value == 2)
System.out.println(“English
Books”);
else if(value = = 3)
System.out.println(“GS Books”);
else
System.out.println(“Wrong choice”);

(vii) Determine the data type and value of x after executing the following code:
char Y = ‘5’;
x = Character.isLetter(y);

Continue on next page.....

Install NODIA App to See the Solutions.


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

(viii) What will be the output of the following expressions?


(a) Math.sqrt (–144);
(b) Math.pow(–3, 3);

(ix) Find the output of the following program snippet.


int a= 97;
char ch = Character
.toUpperCase((char)a);
System.out.println(ch+“ all is well”);

(x) Write the Java statement for the following mathematical expression :
2
x = − b + b − 4ac
2a

SECTION B
Attempt any four questions from this section.

QUESTION 3.

Write a program that displays the Fibonacci series up to the number of terms specified by the user. For example,
if the user inputs 10, the program should display the first 10 numbers in the Fibonacci sequence.

QUESTION 4.

Write a program to implement a binary search on an array of integer numbers.

QUESTION 5.

Write a Java program that prompts the user to enter the size of an array and then the elements of the array.
The program should find and display the largest element in the array.

e.g. For example:

Input: 4, 3, 8, 6, 1

Output: 8

QUESTION 6.

Create a class that accepts two strings from the user, converts them to upper-case, and checks if they are equal.
If the strings are not equal, display the string with the greater length. If both strings have the same length,
display a message indicating that both strings are of equal length.

Continue on next page.....

Install NODIA App to See the Solutions.


Click Here To Install
Page 6 Sample Paper 12 NODIA

QUESTION 7.

Write a program to input the names and percentages of 35 students in Class X, storing them in two separate
one-dimensional arrays. Sort the student details in descending order based on their percentages using the
selection sort method. Finally, display the names and percentages of the top 10 students in the class.

QUESTION 8.

Write a program to accept the names and total marks of N students, storing them in two one-dimensional arrays:
name[] for names and total-marks [] for marks.”.

Calculate and print :


(i) The average of the total marks obtained by N number of students.
[average = (sum of total marks of all the students)/N]
(ii) Deviation of each student’s total marks with the average.
[deviation = total marks of a student – average]

******

Install NODIA App to See the Solutions.


Click Here To Install

You might also like