0% found this document useful (0 votes)
889 views5 pages

Arihant - Computer Sample Paper 13 ICSE 2025

Uploaded by

scrai1945
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)
889 views5 pages

Arihant - Computer Sample Paper 13 ICSE 2025

Uploaded by

scrai1945
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/ 5

RPCode:PB-13/15 Series i-Succeed 13-25/15 Roll No.

Sample Question Paper 13


Computer Applications 10th (Code 86)
Answer to this paper must be written on the paper provided separately.
.Na ll not be allowed to write during the first 15 minutes. This time is to be spent in
rading the question paper. Time:2 Hrs.
The time given at the head of this paper is the time allowed for writing the answers. Max. Marks:100
This paper is divided into two sections. Attempt all questions from Section Aand any
four questions from Section B.
: The intended marks for questions or parts of questions are given in brackets [ J.

Sectüon AAttempt all questions from this section.


1. Choose the correct answers to the questions (iv) Assume x =1 with the following code
from the given options. [20] snippet : Analysis
() Given the following 2D array: " Analysis int y =--X;
Column 0 Column 1 Column 2 Column 3 Which one of the following is true?
Row 0 5 6 7 8 (a) x=1y=1 (b) x=0 y=0
Row 1 9 10
(c) x=\y=0 (d) x= y=1
4 12
Row 2
(v) Which of the following is not control
13 14 15 16
flow java keyword? . Understanding
What is the value at array[1][3]? (a) class (b) if
(a) 5 (b) 12 (c) else (d) catch
(c) 14 (d) 16 (vi) What is the output of Math.ceil(-1.7)?
(i) Which of the following might make the Analysis
Java compiler report a syntax error in a (a) -1.0 (b) 0
particular line of aprogram? (c) 1 (d) 1.0
Understanding (vii) Which method can be used to split a
(a) The program is typed in the wrong font. string into an array of substrings based
(b) The line contairns a comma(,) instead of a on a given delimiter? . Understanding
dot(). (a) split() (b) divide(0
(c) It is caused by Java runtime.
(d) Program takes too long to complete. (c) tokenize() (d) separate()
(ii) Size of char is (vit) Which operator cannot be used with
" Recall
if-else statement? " Understanding
(a) 2bytes (b) 4 bytes (b) || (c) && (d) ?:
(a) <=
(c) 8bytes (d) 1byte
i Succeed
124 Computer
(ix) Consider the array given below: representation of
Applicatlons Csst
an object is
char ch[]={ '0', 'A', 'T'}: from the outside.
hidden
" Ayplication
Write the output of the following Reason (R)
achieved in Encapsulation
is
statements: . Analysis Java by using access
System. out.println(ch[0]*4 );:
(a) 79 (b) 4
modifiers such as private, protected.
and public.
(c) 316 (d) 'O (a) Both A and R are
true, and Ris the
(x) JVM converts bytecode directly into correct explanation of A.
" Analysis (b)Both A and R are true, but Ris not
(a) machine code (b) another byte code the correct explanation of A.
(c) high level code (d) None of these (c) A is true, but R is false.
(xi) Which of the following is a correct (d)A is false, but R is true.
way to initialize an array in Java? (xvii) What is the correct way to
Analysis concatenate two String variables
(a) int arr[]= new int[6]; str4 and str5 in Java? " Analysis
(b) int arr[6] = new int[]; A. str4 + str5;
(c) int arrl] = new int[6] (1, 2, 3, 4, 5, 6}; B. str4.concat(str5);
(d) int arr() = new int[6];
ollha C. str4.append(str5);
(xii) Method prototype for the method (a) ony A (b) only B
two Stringttep it
con which accepts (c) only C (d) AllA,B,C
arguments and returns a String (xvii) What is the difference between
value. Understanding and equals() method in Java when
(a) string con(String a, String b) comparing strings? " Analysis
(b) String con(String a, Stringb) (a) Both=and equals() method
(c) String con(a, b)
ob arit ocompare the content of the strings.
(d) void con(String a, String b) (b) =compares references (memory
addresses) of the strings, while
(xiii) What is the purpose of the return equals() compares the content.
" Recall
keyword in a method?
(c) =is used for case-sensitive
(a) To terminate the method execution comparison, while equals() is sed
and transfer control back to the o f o rcase-insensitive comparison.
caller. and
(d) There is no difference;
intercharngeable
(b) To create a loop. equals() method are
3P-13 (c) To call another method. for comparing strings.
(d) To print a value to the console. (xix) Arrange the following
code
a order to create
(xiv) Which keyword is used to create snippets in correct
" Recall and print its
subclass in Java? an array of integers Analysis
(a) extends (b) implements elements:
(c) inheríits (d) creates
s A. }
(Xv) What does the isWhitespace (1, 2, 3, 4, 5. 6}:
method return if the character B. int[] numbers = (numbers[i]t
C.System.
out.print
passed to it is a whitespace 280
Recall "): lengtht
character? = 0: i < numbers.
n i D. for (int i
(a) trueiitos c (b) false j++) {
(c) null (d) void ArrayExample{
E. public class
of
(xvi) Assertion (A) In Object-Oriented out.println("Elements
Programming (OOP), encapsulation Wal F. System,
the array:"):
ensures that the internal
Paper13 125
anpleQuestion

G. publ ic static void main(String[] The above code has error in it,
args) {
(a) E, G, B, D, F, C, A identify it to produce the output
(b) E, G, B, F, D, C, A "UNKNOWN FLAVOR". Analysis
(c) E, G, B, D, C, E, A (iv) Write a java expression for
(d) E, G, B, D, E, C, A 10Wa-5/b [2]
(Xx) Assertion (A) Constructors in Java . Understanding
are special methods used to
(v) How many times below loop
initialize objects. " Application execute? [2]
Reason (R)Constructors have the for (int i = 0; i <5; it+)
same name as the class and do not
have a return type. System.out.println
(a) Both A and R are true, and R is the ("Iteration " + (1 t 1));
correct explanation of A.
(b) BothA and R are true, but R is not
the correct explanation of A.
What is the output? " Analysis
(c) A is true, but R is false. (vi) Write the output of the following
(d) A is false, but R is true. string methods: [2]
String x="pot", y="pet":
2. (i) What will be the output of the
(a) System.out.println
following statements? [2] (x.charAt (0)==y.charAt(0));
int a=3;
on le Toi (b) System.out.println
System. out. println(" "+(1+a));
System.out.println(" "+1+a): (x.charAt(1)==y.charAt(1) ):
. Understanding " Analysis
(ii) Evaluate the given expression when (vii) Predict the output of the following
the value of a=1 and b-6
ollet code snippet: [2]
[2] t char c h = ' V ' : l a e
a t= b++ *--a
char chr=Character
System.out.println ("a= "+a):
.toLowerCase(ch);
System.out.println ("b= "+b); int n=(int) chr-10;
o8 Analysis
System.out.println((char)
(iül) Consider the below code: [2] n+"\t"+chr);
String flavor = "CHOCOLATE": viii) Identi fy the error in
if (flavor. equals("VANI LLA")) the below code SP-13
public class Error
System.out.println
("VANILLA ICE CREAM" ); public static void
main(String[] args)
else if (flavor. equals
int num "Neha":
("STRAWBERRY">) System.out.println
("Number: " t num) ;
System.out.println
("STRAWBERRY ICE CREAM) "Analysis
else
(vii) Identify the error in the below code
[2]
public class Error
System.out.println
("UNKNOWN FLAVOR): public static void
main(String[] args)
126 i
Succeed Computer
int num "Neha":
Applica
("Creating employee
name + "
tions
System. out.println("Number: aged
+ nun); public static void

(ix) Identify the constructor in the


" Analysis main(Stringt] args)
Employee empl new -
below code:
public class Employee
[2] Employee("Al1ce", 55).
Employee emp2 = new
}
Empl oyee("Bob", 40):
private String n me;
private int age; (x)
" Analysis
public Employee(String Consider thefollowingtheprogram
empName, int empAge) segment and arnswer questions
given below:
int x[J[]-{{1, 2),(3,4}.
name
empName; {7,8), (9,10}}:
age = empAge;
(a) What is the position of 1?
System.out.println (b) What is the value of 9? .
Analysis
Section B Answer any four questions from this section.
3. DIDC acourier company charges for
the courier based on the weight of the void print() To print the details
parcel. Define a class with the following
specifications: [15] void main() to create and object of the class
and invoke the methods
Class name Courier
Member variables . UnderstandinglApplication
name name of the Customer 4. Implement the Quick Sort algorithm in
weight weight of the parcel in Java to sort the array {5.2, 5.3, 5.4, 1.5,
address
kilograms 1.7} in ascending order. Provide the Java
SP-13 address of the recipient code for the Quick Sort algorithm and
bill
amount to be paid demonstrate its usage by displaying
type D-domestic, I-international both the original and sorted arrays. [15]
Member methods " UnderstandinglAyplication
void acoept() to accept the details using the 5. Define a Java class StringConverter that
methods of the Scanner class accepts a string and modifies it
only. (15)
void calculate() to calculate the bill as per the according to the following rules:
following criteria: Convert all consonants in the string to
uppercase.
" UnderstandinglApplication
Weight In Kgs Rate per Kg
First 5Kgs 1000 Keplace all spaces in the string with '2.
14
Next 5 Kgs 900 6. Define a class to accept values into.
Above 10 Kgs 700 array and find and display the sum Of
[15)
each row.
An additional amount of Rs. " UnderstandinglApplication
1500 is charged if the type of
the courier is I 7. Define a class to accept two numbers,
(International) find the sum of the 2 input
numbers and
1B 127
QuestionPaper
Sample
even
nrint whether resultant number is void display(int to print the quotient of the
division of m and n if m is
orodd. [15] n, int m)
. Understanding/Application greater than n otherwise
print the sum of twice n and
overload the method
8. Define a class to thrice m.
display() as follows: [15] double to print the value of z where
void display() to print the following format display(double zp°q and p-a+b/c and
using nested loop. a, double b, a+btc.
CccCC double c)
CCccC
CCCCC . UnderstandinglAyplication

Answers
1. ()(6) (ii) (b) (ii) (a) (iv) (b) (v) (a)
(vi) (a) (vi) (a) (vii) (d) (ix) (c) (%) (a) For answers, scan
(xi) (a) (xii) (b) (xii) (a) (xiv) (a) (xv) (a) the givenQR code.
(xvi) (a) (xvii) (a) (xviil) (b) (xix) (d) (xx) (a)

SP-13

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy