Question Paper2025

ICSE Class 10 Computer Applications — 2025 Paper

36 solved questions from Solved 2025 Question Paper ICSE Class 10 Computer Applications. Every answer follows the ICSE marking scheme.

Section
Marks
Insight
1(i)1 Mark · 2025 · Section A · 2025 PaperFull page

Character class methods are found in the package called:

Show SolutionHide Solution↓

java.lang

Reason — The Character class methods are found in the java.lang package because this package contains fundamental classes that are automatically available in every Java program. The Character class provides methods to work with characters, such as checking whether a character is a letter, digit, uppercase, or lowercase.

1(ii)1 Mark · 2025 · Section A · 2025 PaperFull page

System.out.println('Z' + 32); will display:

Show SolutionHide Solution↓

122

Reason — In the statement System.out.println('Z' + 32);, the character 'Z' is converted to its ASCII value 90, and then 32 is added to it, giving the result 122. Since the + operator with a character and an integer results in an integer, the output displayed will be 122.

1(iii)1 Mark · 2025 · Section A · 2025 PaperFull page

double x[] = {2.5, 4.5, 5.5, 6.4}; occupies ............... bytes.

Show SolutionHide Solution↓

32

Reason — The double data type in Java occupies 8 bytes of memory. In the array double x[] = {2.5, 4.5, 5.5, 6.4};, there are 4 elements, and each element takes 8 bytes. So, the total memory occupied is 4 × 8 = 32 bytes.

1(iv)1 Mark · 2025 · Section A · 2025 PaperFull page

The output of 42 / 6 % 2 is:

Show SolutionHide Solution↓

1

Reason — According to operator precedence in Java, division (/) and modulus (%) have the same priority and are evaluated from left to right.

42 / 6 % 2

= 7 % 2

= 1

1(v)2 Marks · 2025 · Section A · 2025 PaperFull page

Consider the two-dimensional array P[2][3], of peripherals (input/output devices) given below, state the index of the device Barcode Scanner.

Consider the two-dimensional array P[2][3], of peripherals (input/output devices) given below, state the index of the device Barcode Scanner. ICSE 2025 Computer Applications Solved Question Paper.
Show SolutionHide Solution↓

P[1][1]

Reason — In a two-dimensional array P[2][3], the first index represents the row and the second index represents the column. The device "barcode scanner" is located in the second row (index 1) and the second column (index 1), so its index is P[1][1].

1(vi)1 Mark · 2025 · Section A · 2025 PaperFull page

Which of the following is user-defined data type?

Which of the following is user-defined data type. ICSE 2025 Computer Applications Solved Question Paper.
Show SolutionHide Solution↓

1 and 3

Reason — A user-defined data type is a data type defined by the user. In the given options, array and class are user-defined data types because they are created by the user to store multiple values or define their own structure. double and boolean are predefined (primitive) data types.

1(vii)1 Mark · 2025 · Section A · 2025 PaperFull page

Select the infinite loop:

Show SolutionHide Solution↓

for(int i = 2; i != 0; i -= 3)

Reason — The loop for(int i = 2; i != 0; i -= 3) is an infinite loop because the value of i starts at 2 and decreases by 3 in every iteration. Since i will never become 0 (it will take values like 2, -1, -4, -7, etc.), the condition i != 0 will always be true. Therefore, the loop will continue to run forever.

1(viii)1 Mark · 2025 · Section A · 2025 PaperFull page

The output of Math.max(-7, Math.min(-5, -4)) is:

Show SolutionHide Solution↓

-5

Reason — The method Math.min(-5, -4) returns the smaller of the two values, which is -5. Then, Math.max(-7, -5) returns the greater of the two values, which is -5. Hence, the final output of Math.max(-7, Math.min(-5, -4)) is -5.

1(ix)1 Mark · 2025 · Section A · 2025 PaperFull page

Which of the following is true for the given object creation statement?

Game cricket = new Game();

Show SolutionHide Solution↓

Game is a class and cricket is an object

Reason — In the statement Game cricket = new Game();, Game is the name of the class, and cricket is the object (or instance) created from that class. The new keyword is used to create a new object of the class. Therefore, Game is the class, and cricket is the object.

1(x)1 Mark · 2025 · Section A · 2025 PaperFull page

Post Office is an example for ............... access specifier.

Show SolutionHide Solution↓

public

Reason — A Post Office is accessible to everyone in a community, just like a public access specifier in programming, which allows members of a class to be accessible from any other class or part of the program. Hence, a Post Office is an example of public access specifier.

1(xi)1 Mark · 2025 · Section A · 2025 PaperFull page

Assertion (A): In switch case, break statement avoids fall through.

Reason (R): break statement helps to execute only one case at a time.

Show SolutionHide Solution↓

Both (A) and (R) are true and (R) is a correct explanation of (A).

Reason — In a switch case, the break statement stops the program from executing the next cases after a match is found. Without the break, the program would continue to run all the cases below the matched one (called fall through). Therefore, the break statement helps to execute only one case at a time.

1(xii)1 Mark · 2025 · Section A · 2025 PaperFull page

A physical education teacher asks the students to do the side stretch as shown below, 10 times. Which programming construct the teacher uses?

A physical education teacher asks the students to do the side stretch as shown below, 10 times. Which programming construct the teacher uses? ICSE 2025 Computer Applications Solved Question Paper.
Show SolutionHide Solution↓

for

Reason — The teacher asks the students to do the side stretch 10 times, which means repeating the same action multiple times. In programming, the for loop is used to repeat a block of code a specific number of times. Hence, the teacher is using the concept similar to a for loop to instruct repetition.

1(xiii)1 Mark · 2025 · Section A · 2025 PaperFull page

The index(subscript) of the last element of an array ar[] is:

Show SolutionHide Solution↓

ar.length – 1

Reason — In Java, the length of an array ar is given by ar.length (without parentheses). Since array indexing starts from 0, the last element's index is always one less than the total length of the array. Therefore, the index of the last element is ar.length – 1.

1(xiv)1 Mark · 2025 · Section A · 2025 PaperFull page

Assertion (A): A clock is a real-life example of nested loops.

Reason (R): The hour hand moves through 12 positions, while the minute hand moves through 60 positions within each hour.

Show SolutionHide Solution↓

Both (A) and (R) are true and (R) is a correct explanation of (A).

Reason — A clock is a real-life example of nested loops because the hour hand moves through 12 positions, and within each hour, the minute hand moves through 60 positions. This shows that one loop (minute hand) runs inside another loop (hour hand), which is similar to the concept of nested loops in programming.

1(xv)1 Mark · 2025 · Section A · 2025 PaperFull page

Which of the following pairs of methods will cause a compile-time error due to incorrect method overloading?

Show SolutionHide Solution↓

void test(int a) and int test(int a)

Reason — In Java, method overloading depends on the method's name and its parameter list (number or type of parameters). The return type alone is not considered for method overloading. So, void test(int a) and int test(int a) have the same name and same parameter list, which causes a compile-time error because they differ only in return type, not in parameters.

1(xvi)1 Mark · 2025 · Section A · 2025 PaperFull page

Which of the following converts "25" to 25.0?

Show SolutionHide Solution↓

Double.parseDouble("25")

Reason — In Java, the method Double.parseDouble("25") is used to convert a string containing a numeric value into a double data type. It belongs to the Double class and takes a string as an argument, returning its equivalent double value.

1(xvii)1 Mark · 2025 · Section A · 2025 PaperFull page

Consider the program segment:

int p = 0;
for(p = 4; p > 0; p -= 2);
System.out.print(p);
System.out.println(p);

The above statement will display:

Show SolutionHide Solution↓

00

Reason

1. Initialization: int p = 0;

  • This line declares an integer variable p and initializes it to 0.

2. For Loop: for(p = 4; p > 0; p -= 2);

  • p = 4 → loop starts with p assigned the value 4.
  • Condition: p > 0 is true (since 4 > 0).
  • The semicolon (;) at the end means the loop body is empty and does nothing.
  • Update: p -= 2 decreases p by 2.
  • Next value of p = 2 → still > 0, so the loop continues.
  • Decrease again: p -= 2 → p = 0 → now the condition p > 0 is false, loop stops.

3. After the Loop: p is now 0.

4. Output Statements:

  • System.out.print(p); prints 0 without moving to the next line.
  • System.out.println(p); prints 0 and moves to the next line.
1(xviii)1 Mark · 2025 · Section A · 2025 PaperFull page

The output of the below statement is:

System.out.println("I said, \"It\'s wise to obey elders.\"");

Show SolutionHide Solution↓

I said, "It's wise to obey elders."

Reason — In Java, the backslash \ is used as an escape character. The statement uses escape sequences:

  • \" to include double quotes inside a string.
  • \' to include a single quote inside a string.

So the output preserves both the double quotes around "It's wise to obey elders." and the apostrophe in It's.

Hence, the output is: I said, "It's wise to obey elders."

1(xix)1 Mark · 2025 · Section A · 2025 PaperFull page

What is the output of the statement given below?

"ANGER".compareTo("ANGEL")

Show SolutionHide Solution↓

6

Reason — The compareTo() method compares two strings lexicographically by comparing their characters one by one. It returns the difference between the first pair of characters that differ in the two strings.

Here, comparing "ANGER" and "ANGEL":

  • Characters 'A', 'N', 'G', and 'E' are the same in both strings at positions 0 to 3.
  • At position 4, 'R' (ASCII value 82) in "ANGER" is compared with 'L' (ASCII value 76) in "ANGEL".
  • The difference is 82 - 76 = 6.

Thus, the output is 6.

1(xx)1 Mark · 2025 · Section A · 2025 PaperFull page

Consider the following program segment in which the statements are jumbled.
Choose the correct order of statements to calculate and return the factorial of 4.

for(k = 1; k <= 4; k++) → 1
return fa; → 2
long fa = 1, k; → 3
fa *= k; → 4
Show SolutionHide Solution↓

3, 1, 4, 2

Reason — To calculate and return the factorial of 4 using a loop, we must follow the proper sequence of statements:

  1. long fa = 1, k; – This is the declaration and initialization of variables fa and k.
  2. for(k = 1; k <= 4; k++) – This sets up a loop to run from 1 to 4.
  3. fa *= k; – This multiplies the current value of fa by k during each iteration.
  4. return fa; – This returns the final calculated factorial value.

So, the correct order is: 3, 1, 4, 2, which correctly calculates and returns the factorial.

2(i)1 Mark · 2025 · Section A · 2025 PaperFull page

Write the Java expression to find the product of square root of P and the square root of Q using the methods of Math class.

Show SolutionHide Solution↓

Math.sqrt(P) * Math.sqrt(Q)

2(ii)1 Mark · 2025 · Section A · 2025 PaperFull page

Write the output of the following String method:

String x = "talent";
String y = "matrix";
System.out.println(x.substring(3).concat(y.substring(3)));
Show SolutionHide Solution↓
entrix
  • x.substring(3) returns the substring of "talent" from index 3 onwards, i.e., "ent".
  • y.substring(3) returns the substring of "matrix" from index 3 onwards, i.e., "rix".
  • The concat() method joins both substrings: "ent" + "rix" = "entrix".
2(iii)1 Mark · 2025 · Section A · 2025 PaperFull page

Write the Java statement for creating an object named 'sifra' of the class 'Robot', which takes three double parameters.

Show SolutionHide Solution↓

Robot sifra = new Robot(2.5, 3.5, 4.5);

2(iv)1 Mark · 2025 · Section A · 2025 PaperFull page

Convert the given loop into exit-controlled loop.

int a, b;
for(a = 10, b = 1; a >= 1; a -= 2){
b += a;
b++;
}
System.out.print(b);
Show SolutionHide Solution↓
int a = 10, b = 1;
do {
    b += a;
    b++;
    a -= 2;
} while(a >= 1);
System.out.print(b);
2(v)1 Mark · 2025 · Section A · 2025 PaperFull page

Consider and give the output of the following program:

class report{
    int a, b;
    report(){
        a = 10;
        b = 15;
    }
    report(int x, int y){
        a = x;
        b = y;
    }
    void print(){
        System.out.println(a * b);
    }
    static void main(){
        report r = new report();
        r.print();
        report p = new report(4, 5);
        p.print();
    }
}
Show SolutionHide Solution↓
150
20

1. Class Definition:

  • The class report is defined with two integer variables: a and b.

2. Constructors:

  • Default constructor: report()
    This constructor sets the values of a and b to 10 and 15, respectively, when an object is created without any parameters.

  • Parameterized constructor: report(int x, int y)
    This constructor accepts two integer values x and y and assigns them to a and b.

3. Method print():

  • This method prints the product of the two variables a and b.

4. Static method main():
Inside the main() method:

  • First, an object r of class report is created using the default constructor.
  • Then, the print() method is called on r which prints the product 10 * 15 = 150.
  • Next, an object p is created using the parameterized constructor with values 4 and 5.
  • The print() method is called on p which prints the product 4 * 5 = 20.
2(vi)1 Mark · 2025 · Section A · 2025 PaperFull page

(a) Name one String method which results in positive integer only.

(b) Name one String method which results in a character.

Show SolutionHide Solution↓

(a) length()

(b) charAt()

2(vii)1 Mark · 2025 · Section A · 2025 PaperFull page

John was asked to write a Java code to calculate the surface area of a cone. The following code was written by him: Surface area of cone is A = πrl

l = $\sqrt{r^2 + h^2}$

class area{
    double area(double r, double h){
        double l, a;
        a = 22.0 / 7 * r * l;
        l = Math.sqrt(r * r + h * h);
        return a;
    }
}

Specify the type of the error in the above program, correct and write the program to be error free.

Show SolutionHide Solution↓

The compile-time error occurs because the variable l is used before it is initialized.

The corrected code is as follows:

class area{
    double area(double r, double h){
        double l, a;
        l = Math.sqrt(r * r + h * h);
        a = 22.0 / 7 * r * l;
        return a;
    }
}
2(viii)1 Mark · 2025 · Section A · 2025 PaperFull page

Consider the following array and answer the questions given below:

int a[] = {12, 10, 8, 4, 6, 2, 3, 5, 7};

(a) What is the output of System.out.print(a[0] + a[5]);?

(b) What is the index (subscript) of the largest element of the array a[]?

Show SolutionHide Solution↓

(a) 14

(b) The largest element in the array is 12, which is at index 0.

  • a[0] is 12.
  • a[5] is 2.
  • Sum = 12 + 2 = 14.
2(ix)1 Mark · 2025 · Section A · 2025 PaperFull page

(a) Write the Java statement to initialize the first 6 odd numbers in a 3 × 2 array.

(b) What is the result of x[0][1] + x[2][1] of the above array?

Show SolutionHide Solution↓

(a) x[3][2] = {{1, 3}, {5, 7}, {9, 11}};

(b) 14

  • x[0][1] = 3.
  • x[2][1] = 11.
  • Sum = 3 + 11 = 14.
2(x)1 Mark · 2025 · Section A · 2025 PaperFull page

Give the output of the following program segment and specify how many times the loop is executed.

String s = "JAVA";
for(i = 0; i < s.length(); i += 2)
    System.out.println(s.substring(i));
Show SolutionHide Solution↓
JAVA
VA

The loop executes 2 times.

  • The string x contains the value "JAVA", which has a length of 4.
  • The for loop initializes i to 0 and increments it by 2 in each iteration (i = 0, 2).
  • In the first iteration, when i is 0, x.substring(0) extracts the substring from index 0 to the end, which is "JAVA". This is printed.
  • In the second iteration, when i is 2, x.substring(2) extracts the substring from index 2 to the end, which is "VA". This is printed.
  • When i becomes 4, the condition i < x.length() (i.e., 4 < 4) becomes false, so the loop terminates.
  • Therefore, the loop executes exactly 2 times, printing the substrings "JAVA" and "VA".
3Written · 2025 · Section B · 2025 PaperFull page

Define a class named CloudStorage with the following specifications:
Member Variables:
int acno – stores the user’s account number
int space – stores the amount of storage space in GB purchased by the user
double bill – stores the total price to be paid by the user
Member Methods:
void accept() – prompts the user to input their account number and storage space using Scanner class methods only.
void calculate() – calculates the bill total price based on the storage space purchased using the pricing table provided:

Storage rangePrice per GB (Rs)
First 15 GB15
Next 15 GB13
Above 30 GB11

void display() – displays the account number, storage space and bill to be paid.

Write a main method to create an object of the class and invoke the methods of the class with respect to the object.

Show SolutionHide Solution↓
import java.util.Scanner;
class CloudStorage{
    int acno;
    int space;
    double bill;
    public void accept(){
        Scanner in = new Scanner(System.in);
        System.out.print("Account number: ");
        acno = in.nextInt();
        System.out.print("Space: ");
        space = in.nextInt();
    }
    public void calculate(){
        if(space <= 15)
            bill = space * 15;
        else if(space <= 30)
            bill = 225 + (space - 15) * 13;
        else
            bill = 420 + (space - 30) * 11;
    }
    public void display(){
        System.out.println("Account No. " + acno);
        System.out.println("Storage space: " + space);
        System.out.println("Bill: " + bill);
    }
    public static void main(String[] args){
        CloudStorage obj = new CloudStorage();
        obj.accept();
        obj.calculate();
        obj.display();
    }
}
BlueJ output of CloudStorage.java BlueJ output of CloudStorage.java BlueJ output of CloudStorage.java
4Written · 2025 · Section B · 2025 PaperFull page

Define a class to accept values into a 4 × 4 integer array. Calculate and print the NORM of the array.
NORM is the square root of sum of squares of all elements.

Show SolutionHide Solution↓
1	2	1	3
5	2	1	6
3	6	1	2
3	4	6	3

Sum of squares of elements = 1 + 4 + 1 + 9 + 25 + 4 + 1 + 36 + 9 + 36 + 1 + 4 + 9 + 16 + 36 + 9 = 201
NORM = Square root of 201 = 14.177446878757825

import java.util.Scanner;
class Norm{
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int a[][] = new int[4][4];
        int sum = 0;
        System.out.println("Enter array elements:");
        for(int i = 0; i < 4; i++){
            for(int j = 0; j < 4; j++){
                a[i][j] = in.nextInt();
            }
        }
        
        for(int i = 0; i < 4; i++){
            for(int j = 0; j < 4; j++){
                sum += a[i][j] * a[i][j];
            }
        }
        
        double root = Math.sqrt(sum);
        System.out.println("NORM = " + root);
    }
}
BlueJ output of Norm.java
5Written · 2025 · Section B · 2025 PaperFull page

Define a class to accept a String and print if it is a Super String or not. A String is Super if the number of uppercase letters are equal to the number of lowercase letters. [Use Character and String methods only]
Example: “COmmITmeNt”
Number of uppercase letters = 5
Number of lowercase letters = 5
String is a Super String

Show SolutionHide Solution↓
import java.util.Scanner;
class SuperString{
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        System.out.print("Enter the string: ");
        String s = in.nextLine();
        int upper = 0;
        int lower = 0;
        int l = s.length();
        for(int i = 0; i < l; i++){
            char ch = s.charAt(i);
            if(Character.isUpperCase(ch))
                upper++;
            else if(Character.isLowerCase(ch))
                lower++;
        }
        if(upper == lower)
            System.out.println("String is a Super String");
        else
            System.out.println("String is not a Super String");
    }
}
BlueJ output of SuperString.java
6Written · 2025 · Section B · 2025 PaperFull page

Define a class to initialize the following data in an array.
Search for a given character input by the user, using the Binary Search technique.
Print “Search successful” if the character is found otherwise print “Search is not successful”.
‘A’, ‘H’, ‘N’, ‘P’, ‘S’, ‘U’, ‘W’, ‘Y’, ‘Z’, ‘b’, ‘d’

Show SolutionHide Solution↓
import java.util.Scanner;
class Search{
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        char a[] = {'A', 'H', 'N', 'P', 'S', 'U', 'W', 'Y', 'Z', 'b', 'd'};
        System.out.print("Character to be searched: ");
        char key = in.next().charAt(0);
        int low = 0;
        int high = a.length - 1;
        int mid = 0;
        while(low <= high){
            mid = (low + high) / 2;
            if(key == a[mid])
                break;
            else if(key < a[mid])
                high = mid - 1;
            else
                low = mid + 1;
        }
        if(low > high)
            System.out.println("Search is not successful");
        else
            System.out.println("Search is successful");
    }
}
BlueJ output of Search.java BlueJ output of Search.java
7Written · 2025 · Section B · 2025 PaperFull page

Define a class to overload the method print() as follows:
void print() – To print the given format using nested loops.

Show SolutionHide Solution↓
@#@#@
@#@#@
@#@#@
@#@#@

double print(double a, double b) – To display the sum of numbers between a and b with difference of 0.5.
e.g. if a = 1.0, b = 4.0
Output is: 1.0 + 1.5 + 2.0 + 2.5 + … + 4.0
int print(char ch1, char ch2) – Compare the two characters and return the ASCII code of the largest character.

import java.util.Scanner;

class Overload {
    public void print() {
        for(int i = 0; i < 4; i++) {
            for(int j = 0; j < 5; j++) {
                if (j % 2 == 0) {
                    System.out.print('@');
                }
                else {
                    System.out.print('#');
                }
            }
            System.out.println();
        }
    }

    public double print(double a, double b) {
        double sum = 0.0;
        for(double i = a; i <= b; i += 0.5)
            sum += i;
        System.out.println("Sum = " + sum);
        return sum;
    }

    public int print(char ch1, char ch2) {
        int maxAscii = (ch1 > ch2) ? (int)ch1 : (int)ch2;
        System.out.println("Larger ASCII code = " + maxAscii);
        return maxAscii;
    }

    public static void main(String[] args) {
        Overload obj = new Overload();
        Scanner sc = new Scanner(System.in);
        System.out.println("Pattern:");
        obj.print();
        System.out.print("\nEnter two decimal values (a and b): ");
        double a = sc.nextDouble();
        double b = sc.nextDouble();
        obj.print(a, b);
        System.out.print("\nEnter two characters: ");
        char ch1 = sc.next().charAt(0);
        char ch2 = sc.next().charAt(0);
        obj.print(ch1, ch2);
    }
}
BlueJ output of Overload.java
8Written · 2025 · Section B · 2025 PaperFull page

Define a class to accept a number. Check if the sum of the largest digit and the smallest digit is an even number or an odd number. Print appropriate messages.

Sample Input:64253748
Largest digit:68
Smallest digit:23
Sample Output:Sum is evenSum is odd
Show SolutionHide Solution↓
import java.util.Scanner;

class Find{
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        System.out.print("Enter the number: ");
        
        int num = in.nextInt();
        int sum = 0;
        int s = 10;
        int l = -1;
        
        while (num != 0) {
            int d = num % 10;
            
            if (d < s)
                s = d;
                
            if (d > l)
                l = d;
                
            num /= 10;
        }
        
        sum = s + l;
        
        if(sum % 2 == 0)
            System.out.println("Sum is even");
        else
            System.out.println("Sum is odd");
    }
}
BlueJ output of Find.java BlueJ output of Find.java

Press ↓ to reveal a solution and move to the next question. Browse the free sample bank.

All 357 Computer Applications questions