Back to Tutorials
Sample PapersICSEClass 10Computer Applications

ICSE Class 10 Computer Applications Sample Paper 2027 with Solutions

A full-length ICSE Class 10 Computer Applications sample paper for the 2027 board exam in the latest CISCE format: 20 MCQs, 10 short-answer questions and 6 Java programs, followed by complete solutions with explanations and solved BlueJ programs.

Trushna Tejwani22 October 202625 min read
ICSE Class 10 Computer Applications Sample Paper 2027 with Solutions

This is a complete ICSE Class 10 Computer Applications sample paper for the 2027 board exam. It follows the latest CISCE format. Print it or keep it open in one tab, attempt it in 2 hours without looking at the answers, and then check your work against the full solutions at the end.

Paper Pattern at a Glance

ICSE Computer Applications paper pattern: Section A 40 marks, Section B 60 marks
  • Maximum Marks: 100
  • Time Allowed: 2 hours (plus 15 minutes reading time)
  • Section A (40 marks): Compulsory. Question 1 has 20 MCQs (1 mark each). Question 2 has 10 short-answer questions (2 marks each).
  • Section B (60 marks): Attempt any four of the six questions. Each question carries 15 marks.

COMPUTER APPLICATIONS – SAMPLE PAPER 2027

Class X | Maximum Marks: 100 | Time Allowed: Two Hours

Answers to this paper must be written on the paper provided separately. You will not be allowed to write during the first 15 minutes. This time is to be spent reading the question paper. The time given at the head of this paper is the time allowed for writing the answers.
This paper is divided into two sections. Attempt all questions from Section A and any four questions from Section B. The intended marks for questions or parts of questions are given in brackets [ ].

SECTION A (Attempt all questions from this Section)

Question 1 – Choose the correct answer [20]

(i) Which of the following is NOT a primitive data type?

  • (a) int
  • (b) char
  • (c) String
  • (d) boolean

(ii) The size of a char in Java is:

  • (a) 1 byte
  • (b) 2 bytes
  • (c) 4 bytes
  • (d) 8 bytes

(iii) What is the output of Math.round(-4.5)?

  • (a) -5
  • (b) -4
  • (c) -4.0
  • (d) -5.0

(iv) Which keyword is used to create an object of a class?

  • (a) class
  • (b) this
  • (c) new
  • (d) static

(v) What value is returned by "COMPUTER".indexOf('T')?

  • (a) 4
  • (b) 5
  • (c) 6
  • (d) -1

(vi) What is the output of System.out.println(5 + 3 + "Java");?

  • (a) 53Java
  • (b) 8Java
  • (c) Java8
  • (d) Compile-time error

(vii) Which access specifier makes a member accessible only inside its own class?

  • (a) public
  • (b) protected
  • (c) private
  • (d) default

(viii) Which of the following statements about a constructor is correct?

  • (a) It has the same name as the class
  • (b) It has no return type, not even void
  • (c) It is called automatically when an object is created
  • (d) All of these

(ix) If int x = 10;, what is the value of x after x += x++ + ++x;?

  • (a) 31
  • (b) 32
  • (c) 33
  • (d) 22

(x) Which of these is a jump statement?

  • (a) if
  • (b) switch
  • (c) break
  • (d) for

(xi) What does Character.isLetterOrDigit('@') return?

  • (a) true
  • (b) false
  • (c) 0
  • (d) error

(xii) What is the default value of a boolean data member?

  • (a) true
  • (b) false
  • (c) 0
  • (d) null

(xiii) Binary search can be applied only when the array is:

  • (a) unsorted
  • (b) sorted
  • (c) an array of strings
  • (d) of size 10

(xiv) What does "Hello".charAt(5) result in?

  • (a) 'o'
  • (b) ' ' (a blank space)
  • (c) StringIndexOutOfBoundsException
  • (d) null

(xv) How many times does the loop for (int i = 1; i <= 10; i += 3) execute?

  • (a) 3
  • (b) 4
  • (c) 5
  • (d) 10

(xvi) What is wrapping data and methods into a single unit called?

  • (a) Inheritance
  • (b) Polymorphism
  • (c) Encapsulation
  • (d) Abstraction

(xvii) What is the value of Integer.parseInt("25") + 5?

  • (a) 255
  • (b) 30
  • (c) "255"
  • (d) error

(xviii) Which of the following is a valid identifier?

  • (a) 2ndValue
  • (b) _total
  • (c) class
  • (d) my-var

(xix) Assertion (A): A static method can be called without creating an object of the class. Reason (R): A static method belongs to the class, not to any particular object.

  • (a) Both A and R are true, and R is the correct explanation of A
  • (b) Both A and R are true, but R is not the correct explanation of A
  • (c) A is true but R is false
  • (d) A is false but R is true

(xx) What is the automatic conversion of a primitive value into an object of its wrapper class called?

  • (a) Unboxing
  • (b) Autoboxing
  • (c) Type casting
  • (d) Coercion

Question 2 – Answer the following [20]

(i) State one difference between = and ==. [2]

(ii) Write the Java expression for the square root of (a² + b²) divided by 2ab. [2]

(iii) Give the output of the following code: [2]

String s = "ICSE2027";
System.out.println(s.substring(2, 5).toLowerCase());

(iv) Give the output of the following code: [2]

int a[] = {4, 8, 15, 16, 23};
System.out.println(a.length + a[2]);

(v) Rewrite the following using a while loop: [2]

for (int i = 5; i > 0; i--)
    System.out.print(i);

(vi) What is method overloading? Give one example. [2]

(vii) Give the output of the following code: [2]

char ch = 'A';
ch += 2;
System.out.println(ch);
System.out.println('A' + 2);

(viii) Name two types of Java programming errors and give an example of each. [2]

(ix) Give the output of: System.out.println("Ram".compareTo("Raj")); [2]

(x) How many times does the loop below execute, and what is the output? [2]

int n = 1234, s = 0;
while (n > 0) {
    s = s * 10 + n % 10;
    n /= 10;
}
System.out.println(s);

SECTION B (Attempt any four questions from this Section)

The answers in this section should consist of programs in either the BlueJ environment or any program environment with Java as the base. Each program should be written using variable descriptions and mnemonic names, so that the logic of the program is clearly shown. Flowcharts and algorithms are not required.

Question 3 [15]

Design a class CabFare with the following description:

  • Data members: String name (passenger's name), double km (distance travelled) and double fare (amount to be paid)
  • void accept(): to input the name and the distance travelled
  • void calculate(): to calculate the fare using the table below
  • void display(): to print the name, distance and fare

Fare table:

  • Up to 5 km: ₹100 (flat)
  • 6 km to 15 km: ₹12 per km for the distance beyond 5 km
  • Above 15 km: ₹10 per km for the distance beyond 15 km

Write a main() method to create an object and call the above methods.

Question 4 [15]

Using a switch statement, write a menu-driven program to do the following:

(a) Input a number and check whether it is a Spy number. A Spy number is one whose sum of digits equals the product of its digits. Example: 1124, because 1 + 1 + 2 + 4 = 8 and 1 × 1 × 2 × 4 = 8.

(b) Print the following pattern:

1
2 3
4 5 6
7 8 9 10

For an incorrect choice, display an appropriate error message.

Question 5 [15]

Write a program to input 10 integers into an array and sort them in descending order using the bubble sort technique. Print the sorted array.

Question 6 [15]

Write a program to input a sentence and print it with the first letter of every word in capitals. Also print the number of words.

  • Sample Input: java is fun to learn
  • Sample Output: Java Is Fun To Learn and Number of words: 5

Question 7 [15]

Design a class to overload a method area() as follows:

  • double area(double r): returns the area of a circle, using π = 22/7
  • double area(double l, double b): returns the area of a rectangle
  • double area(int a, int b, int c): returns the area of a triangle using Heron's formula, area = √(s(s−a)(s−b)(s−c)), where s = (a+b+c)/2

Question 8 [15]

Write a program to input 10 integers in ascending order into an array. Then input a number and search for it using the binary search technique. If it is found, print its position; otherwise print "Not found".

SOLUTIONS

Check your answers only after you have attempted the full paper.

Solutions to Question 1 (MCQs)

String index diagram for COMPUTER showing T at index 5

(i) (c) String. String is a class, so it is a non-primitive (reference) data type. Java has 8 primitive types: byte, short, int, long, float, double, char and boolean.

(ii) (b) 2 bytes. Java uses the Unicode character set, so every char takes 16 bits.

(iii) (b) -4. Math.round() adds 0.5 and takes the floor: floor(-4.5 + 0.5) = floor(-4.0) = -4. It returns a long, so there is no decimal point.

(iv) (c) new. For example: Student s = new Student();

(v) (b) 5. The indices are C=0, O=1, M=2, P=3, U=4, T=5.

(vi) (b) 8Java. The expression is evaluated from left to right. 5 + 3 gives 8 first, and then 8 is joined with "Java".

(vii) (c) private.

(viii) (d) All of these.

(ix) (b) 32. x += expr means x = x + expr, where the first x is 10. In expr, x++ gives 10 (x becomes 11) and ++x gives 12. So x = 10 + (10 + 12) = 32.

(x) (c) break. The jump statements are break, continue and return.

(xi) (b) false. '@' is neither a letter nor a digit.

(xii) (b) false.

(xiii) (b) sorted. Binary search compares with the middle element and discards half of the array each time. That only works if the array is sorted.

(xiv) (c) StringIndexOutOfBoundsException. "Hello" has length 5, so the valid indices are 0 to 4.

(xv) (b) 4. i takes the values 1, 4, 7 and 10. The next value, 13, fails the condition.

(xvi) (c) Encapsulation.

(xvii) (b) 30. parseInt converts "25" to the int 25, and 25 + 5 = 30.

(xviii) (b) _total. An identifier cannot start with a digit, cannot be a keyword and cannot contain a hyphen.

(xix) (a). Both statements are true, and because a static method belongs to the class, it can be called using the class name without creating an object.

(xx) (b) Autoboxing. Example: Integer obj = 25;

Solutions to Question 2

(i) = is the assignment operator: it stores a value in a variable, as in a = 5. == is a relational operator: it compares two values and returns true or false, as in a == 5.

(ii)

Math.sqrt(a * a + b * b) / (2 * a * b)

(iii) Output: se2. substring(2, 5) takes the characters at indices 2, 3 and 4, which are "SE2", and toLowerCase() changes them to "se2".

(iv) Output: 20. a.length is 5 and a[2] is 15.

(v)

int i = 5;
while (i > 0) {
    System.out.print(i);
    i--;
}

(vi) Method overloading means defining two or more methods with the same name but different parameter lists (a different number, type or order of parameters) in the same class. Java decides which one to call from the arguments. Example:

int sum(int a, int b)          { return a + b; }
double sum(double a, double b) { return a + b; }

(vii) Output:

C
67

ch += 2 keeps the char type, because the compound operator includes an automatic cast, so 'A' + 2 becomes 'C'. In 'A' + 2, the char is promoted to int, which gives 65 + 2 = 67.

(viii)

  • Syntax error: breaks the grammar rules of Java and is caught by the compiler. Example: a missing semicolon in int a = 5
  • Logical error: the program runs but gives a wrong result. Example: writing area = l + b; instead of area = l * b;
  • (A run-time error such as dividing by zero is also an acceptable answer.)

(ix) Output: 3. The strings first differ at index 2. compareTo() returns 'm' − 'j' = 109 − 106 = 3.

(x) The loop executes 4 times (once for each digit) and the output is 4321, because the program reverses the number.

n      n % 10    s
1234   4         4
123    3         43
12     2         432
1      1         4321

Solution to Question 3

import java.util.Scanner;

class CabFare {
    String name;   // passenger name
    double km;     // distance travelled
    double fare;   // amount to be paid

    void accept() {
        Scanner sc = new Scanner(System.in);
        System.out.print("Enter passenger name: ");
        name = sc.nextLine();
        System.out.print("Enter distance in km: ");
        km = sc.nextDouble();
    }

    void calculate() {
        if (km <= 5)
            fare = 100;
        else if (km <= 15)
            fare = 100 + (km - 5) * 12;
        else
            fare = 100 + 10 * 12 + (km - 15) * 10;
    }

    void display() {
        System.out.println("Name\tDistance\tFare");
        System.out.println(name + "\t" + km + "\t\t" + fare);
    }

    public static void main(String args[]) {
        CabFare obj = new CabFare();
        obj.accept();
        obj.calculate();
        obj.display();
    }
}

Sample run: for a distance of 20 km, fare = 100 + (10 × 12) + (5 × 10) = 270.0

Solution to Question 4

import java.util.Scanner;

class Menu {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        System.out.println("1. Spy number");
        System.out.println("2. Number pattern");
        System.out.print("Enter your choice: ");
        int ch = sc.nextInt();

        switch (ch) {
            case 1:
                System.out.print("Enter a number: ");
                int n = sc.nextInt();
                int sum = 0, prod = 1, t = n;
                while (t > 0) {
                    int d = t % 10;
                    sum += d;
                    prod *= d;
                    t /= 10;
                }
                if (sum == prod)
                    System.out.println(n + " is a Spy number");
                else
                    System.out.println(n + " is not a Spy number");
                break;

            case 2:
                int k = 1;
                for (int i = 1; i <= 4; i++) {
                    for (int j = 1; j <= i; j++) {
                        System.out.print(k + " ");
                        k++;
                    }
                    System.out.println();
                }
                break;

            default:
                System.out.println("Invalid choice");
        }
    }
}

Solution to Question 5

import java.util.Scanner;

class BubbleDesc {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int a[] = new int[10];
        System.out.println("Enter 10 integers:");
        for (int i = 0; i < 10; i++)
            a[i] = sc.nextInt();

        for (int i = 0; i < 9; i++) {
            for (int j = 0; j < 9 - i; j++) {
                if (a[j] < a[j + 1]) {   // swap if the left one is smaller
                    int temp = a[j];
                    a[j] = a[j + 1];
                    a[j + 1] = temp;
                }
            }
        }

        System.out.println("Sorted in descending order:");
        for (int i = 0; i < 10; i++)
            System.out.print(a[i] + " ");
    }
}

Solution to Question 6

import java.util.Scanner;

class CapitalWords {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        System.out.print("Enter a sentence: ");
        String s = sc.nextLine().trim() + " ";
        String result = "", word = "";
        int count = 0;

        for (int i = 0; i < s.length(); i++) {
            char ch = s.charAt(i);
            if (ch != ' ') {
                word = word + ch;
            } else if (word.length() > 0) {
                result = result + Character.toUpperCase(word.charAt(0))
                         + word.substring(1) + " ";
                count++;
                word = "";
            }
        }
        System.out.println(result.trim());
        System.out.println("Number of words: " + count);
    }
}

Solution to Question 7

class Shapes {
    double area(double r) {
        return 22.0 / 7 * r * r;
    }

    double area(double l, double b) {
        return l * b;
    }

    double area(int a, int b, int c) {
        double s = (a + b + c) / 2.0;
        return Math.sqrt(s * (s - a) * (s - b) * (s - c));
    }

    public static void main(String args[]) {
        Shapes ob = new Shapes();
        System.out.println("Circle: " + ob.area(7.0));
        System.out.println("Rectangle: " + ob.area(4.0, 5.5));
        System.out.println("Triangle: " + ob.area(3, 4, 5));
    }
}

Output:

Circle: 154.0
Rectangle: 22.0
Triangle: 6.0
Common mistake: writing 22 / 7 instead of 22.0 / 7. Integer division gives 3, which makes the answer wrong.

Solution to Question 8

import java.util.Scanner;

class BinSearch {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int a[] = new int[10];
        System.out.println("Enter 10 integers in ascending order:");
        for (int i = 0; i < 10; i++)
            a[i] = sc.nextInt();
        System.out.print("Enter number to search: ");
        int key = sc.nextInt();

        int low = 0, high = 9, pos = -1;
        while (low <= high) {
            int mid = (low + high) / 2;
            if (a[mid] == key) {
                pos = mid;
                break;
            } else if (a[mid] < key)
                low = mid + 1;
            else
                high = mid - 1;
        }

        if (pos == -1)
            System.out.println("Not found");
        else
            System.out.println(key + " found at position " + (pos + 1));
    }
}

Tips to Score Full Marks in Section B

  • Write a variable description table if your school asks for it. It often carries marks.
  • Always write import java.util.Scanner; and a complete main() method, unless the question asks only for a class.
  • Use meaningful variable names and comments. Examiners give marks for correct logic even when there is a small syntax slip.
  • Practise one program from each category every day: class-based, menu-driven, array, string and overloading.

Want more practice? Browse our ICSE Class 10 solved programs and practice tests sections for hundreds of additional questions.