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

Icjecapu 04

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)
68 views6 pages

Icjecapu 04

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

Sample Paper 04
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 an incorrect way to declare an array?


(a) int arr[ ] = new int[6] (b) int[ ]arr = new int[6]
(c) int[ ]arr = new int[6] (d) int arr[ ] = int[6] new

(ii) What will be the error in the following Java code?


byte b = 50;
b = b*50;
(a) b cannot contain value 100, limited by its range.
(b) Operator has converted b*50 into int, which cannot be converted to byte without casting.
(c) b cannot contain value 50.
(d) No error in this code

(iii) Array elements are always stored in _____memory locations.


(a) Binary search (b) Random
(c) Sequential and random (d) Sequential

(iv) Determine the output of the following statement.


String
a[]={“MI”, “Samsung”, “Micromax”,
“One plus”};
System.out.println(a[3].length);
(a) 8 (b) 7
(c) 5 (d) 9

Install NODIA App to See the Solutions.


Click Here To Install
Page 2 Sample Paper 04 NODIA

(v) Which operator is used to allocate memory for an array variable in Java?
(a) new (b) alloc
(c) malloc (d) None of these

(vi) Which of the following is the superclass of the wrapper classes Double and Float?
(a) Number (b) Digits
(c) Float (d) Long

(vii) When does exceptions in Java arise in code sequence?


(a) Can occur any time (b) Compilation time
(c) Run-time (d) None of the above

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


String s = “7”;
int t = Integer.parseInt(s);
t=t+1000;
System.out.println(t);
(a) 1009 (b) 1000
(c) 1011 (d) 1007

(ix) What is a necessary condition for automatic type conversion in Java?


(a) The destination type can be larger or smaller than source type.
(b) The destination type is larger than source type.
(c) The destination type is smaller than source type.
(d) None of the above

(x) ______means repetition of a set of statements, depending upon a condition test.


(a) Jump (b) Control
(c) Iteration (d) Selection

(xi) Can you declare an array without array size?


(a) Yes (b) No
(c) Depend on array size (d) Depend on array elements

(xii) The get method is an example of which type of method?


(a) mutator method (b) accessors method
(c) class method (d) static method

(xiii) The class from which properties are inherited is called:


(a) sub class (b) derived class
(c) child class (d) base class

(xiv) Primitive types are passed through


(a) call by value (b) call by reference
(c) Both (a) and (b) (d) None of these

Continue on next page.....

Install NODIA App to See the Solutions.


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

(xv) A class can include fields and methods to represent the state and behavior of a/an _____.
(a) identifier (b) variable
(c) token (d) object

(xvi) These data types are the data types defined by the language itself.
(a) Primitive (b) Non-primitive
(c) Both (a) and (b) (d) None of the above

(xvii) Assertion (A) : Primitive data types are the data types defined by the language itself.
Reason (R) : Class interface and array are the examples of primitive data types.
(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.

(xviii) Read the following text and choose the correct answer:
Wrapper classes in Java allow primitive data types to be represented as objects. When an object of a
wrapper class is created, a data field is established where the value of a primitive data type can be stored.
Wrapper class in Java is_____.
(a) Create a new instance of the class
(b) Declare new classes called wrapper
(c) Used to encapsulate primitive data types
(d) None of the above

(xix) Assertion (A) : Class is considered a primitive data type.


Reason (R) : A class is a user-defined data type, meaning it is created by the user.
(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) It is also referred to as a desktop or window-based application.


(a) Package
(b) Java Applet
(c) Servlet
(d) Stand alone application

Continue on next page.....

Install NODIA App to See the Solutions.


Click Here To Install
Page 4 Sample Paper 04 NODIA

QUESTION 2.

(i) Observe the following class.


public class Myclass
{
public static int
a=4, b=5, c=6;
public int x=2, y=3;
}
Identify the variables for which each object of the class will have its own unique copy.

(ii) What will the following code output?


String s = new String
(“Abhishek”);
System.out.println(s.toUpperCase());

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


double x = 3.7, y = 3.3;
System.out.println(Math.min(Math.
floor(x), y));
System.out.println(Math.max(Math.
ceil(x), y));

(iv) Write the Java statement for the given mathematical expression:

d= 3x + x2
a+b

(v) Define the charAt() function.

(vi) State the number of bytes occupied by char and int data types.

(vii) What will be the output of following code snippet,


int n = 300, a = 200;
if(a + n * 10 > 5000)
System.out.println(“100”);
else
System.out.println(“200”);

(viii) State the values of num and chr :


char ch = ‘C’;
int num = ch + 3;
char chr = (char) num;

(ix) Write the output of the following code in Java.


int x = 0;
while (x <= 3) {
System.out.println(x);
x = x + 1;
}

Install NODIA App to See the Solutions.


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

(x) Rewrite the following code using while loop.


int a= 100;
for(int b=2; b<=30; b=b+5)
{
System.out.println(“\n”+(b+a));
a=a-2;
}

SECTION B
Attempt any four questions from this section.

QUESTION 3.

Write a program to enter a number and check whether the number is Neon or not. A number is said to be Neon
if sum of the digits of the square of the number is equal to the number itself.

e.g.Input :9

Output : 9*9 = 81, 8+1 = 9


9 is Neon number.

QUESTION 4.

Write a program to print following patterns.


(i) 1 2 3 4 5 (ii) A
1 2 3 4 BA
1 2 3 CBA
1 2 DCBA
1 EDCBA

QUESTION 5.

Create a class The-string that takes a string input of up to 100 characters and counts the number of vowels,
consonants, digits, and spaces in the provided sentence using if-else statements in Java.

QUESTION 6.

Define a class StringMinMax to identify the smallest and the largest word present in the string.

e.g. Input: Hello this is wow world

Output: Smallest word: is Largest word: Hello

Continue on next page.....

Install NODIA App to See the Solutions.


Click Here To Install
Page 6 Sample Paper 04 NODIA

QUESTION 7.

Define a class to accept values in integer array of size 10. Find sum of one digit number and sum of two digit
numbers entered. Display them separately.

Example : Input

a [ ] ={2, 12, 4, 9, 18, 25, 3, 32, 20, 1}

Output Sum of one digit numbers

2 + 4 + 9 + 3 + 1 = 19

Sum of two digit numbers

12 + 18 + 25 + 32 + 20 = 107

QUESTION 8.

Write a program to input integer elements into an array of size 20 and perform the following operations :
(i) Display largest number from the array.
(ii) Display smallest number from the array.
(iii) Display sum of all the elements of the array.

******

Install NODIA App to See the Solutions.


Click Here To Install

You might also like