ICSE sample paper 2021 Computer applications

This paper is divided into two sections. You are to answer all the questions from section A, and any four from section B.

JAVA videos

ICSE sample paper 2021 computer applications

ICSE sample paper 2021 computer applications
SECTION A (40 Marks)

                                                                                  Attempt all questions
    Q  A.                                                                                                                     [5X2=10]

  1. What is meant by private visibility of a data member?
  2. Predict the output of the following code


     (ii) int a =12, b=14;


  1. Name the following
          (i)Java statement to terminate the running java virtual machine
        (ii)User defined data type created with certain properties and functions. 
  2. classify the following function invocation statements as call by value and call by reference.
            (i)add(int a, int b) where int a=5;
            (ii)add(int a[]) where int a[]={4,5,3,22};
  3. State the output of the following code if the input value of x is (i) 10 (ii)11

System.out.println(“Result is 11”);
else if(++x==10)

System.out.println(“Result is 10”);

else if(–x==10)

System.out.println(“Result is 10”);

System.out.println(“Result is neither 10 nor 11”);

Q B.                                                                                                                                [5X2=10]

  1. Write a prototype of a function equal which accepts two Strings and returns a boolean. 
  2. What are wrapper classes? Write two examples of wrapper classes.
  3. For the method, int add(int a, float b){…..}
    identify the return type and the function signature. 
  4. State the output of the following program segment. 

String S=”Program”;

int n=s.length();



  1. String L[]={“How”, “Are” , “You”};

           for(int i=0;i<L.length;i++)

Q C.                                                                                                                                [10X2=20]

  1. Give one difference between autoboxing and unboxing. 
  2. If a function has several return statements how many of them will be executed?Which one? Why?
  3. What are the two ways of invoking a function?
  4. Name the keyword that :
        (i) is used to allocate the memory to an array.
        (ii) causes the control to transfer back to the method call. 
  5. If int x[]={4,3,7,8,9,10};What will be the values of A and B?


  1. Consider the following code and answer the questions that follow.
    class Student

      int age;

      String name;

    public static void main()


      int a, b;
      Student Ajay= new Student();

      System.out.println(“Object created”);



(i) What is the name of the object of class student?
(ii) What are the class variables?
(iii) What are the local variables?

(iv)What will be the output of the code?

  1. Write an expression in java for the following
  1. Give the output of the following.

      System.out.println(“TRANSPLANT”.compareTo(“TRANSITION “));

  1. Convert the following while loop to the corresponding for loop.
          int m=5, n=10;

          System.out.print(m*n + “ “ );

  1. What will be the output of the following


ICSE sample paper 2021 computer applications
SECTION B (60 Marks)

Attempt any four questions from this Section.

Q 4                                                                                                        [15]

Design a class Bicycle with the following description. 

Instance variables/data members:

      String name – to store the name of customer

      long mno – to store the mobile no. of the customer

      int days – to store the number of days the customer has taken the bicycle on rent

      int bill- to store the bill amount

Member methods:

      Bicycle()- parameterized constructor to enter the values

      void calculate()-  to calculate the bill amount.

             No of days           Bill (Rs/day)

  Days<=7              Rs 200

 7<days<=14          Rs 300

 14<days<=21        Rs 400

 days>21                 Rs 500

    void display()-  to display the details of the customer like name, mobile no, no of days and bill amount. Write the main method to create an object of class and call the above member methods.

Q  5.  Write a program to generate the following patterns                 [15]

P R O G 
P R O G R 
P R O G R A M 
*  *   *   *  *
#  #  #  # 
* * *
#  # 

Q 6.                                                                                                            [15]

Write a menu driven program to find the sum of the following series depending on the user choosing 1 or 2

1. S=1/4+1/8+1/12………upto n terms 

2. S=1/1!-2/2!+3/3!…….upto n terms 

where ! stands for factorial of the number and the factorial value of a number is the product of all integers from 1 to that number, e.g. 5! = 1 2 3 4 5. (use switch-case).                     

Question 7.                                                          [15]

WAP to accept a sentence. Print all the words that start with a vowel and end with a consonant. For example:

Input :”the purpose of education is to replace an empty mind with an open one”

Output: of







ICSE sample paper 2021 computer applications
Question 8.                                                [15]

Write a program to input ten integers in an anay, Using switch-case- statement perform the appropriate operation as per the choice selected by user from the following menu:

1. Print the factorial of each number from the array

2. Print the sum of only odd numbers from the array

For incorrect choice number, appropriate error message should be displayed                            

Question 9.                                                 [15]

Define a class to overload a function sum() as follows:

  1. int  sum(int a, int b): With two integer variables (a and b)calculate and return the sum of all the even numbers in the range between a and b.Sample input: a=2 and b=12

Output: sum=2+4+6+8+10+12=42

  1. double sum(double n): With one double argument calculate and return the product of the following series:sum=1.0+2.0+3.0+4.0+……….+n
  2. int sum(int n): With one integer as an argument and return the product of only the odd digits in the number. Sample input: n=32541

Output: product=3*5*1=15
ICSE sample paper 2021 computer applications

Revision for class x


Please enter your comment!
Please enter your name here