(a) What is inheritance?

ICSE Class 10 Computer Applications PYQ · 2017 Paper · Section A

11 Mark · 2017 · Section A · 2017 Paper

(a) What is inheritance?

Show SolutionHide Solution↓

Inheritance is the mechanism by which a class acquires the properties and methods of another class.

(b) Name the operators listed below:

  1. <
  2. ++
  3. &&
  4. ? :
  1. Less than operator. (It is a relational operator)
  2. Increment operator. (It is an arithmetic operator)
  3. Logical AND operator. (It is a logical operator)
  4. Ternary operator. (It is a conditional operator)

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

char occupies 2 bytes and int occupies 4 bytes.

(d) Write one difference between / and % operator.

/ operator computes the quotient whereas % operator computes the remainder.

(e) String x[] = {"SAMSUNG", "NOKIA", "SONY", "MICROMAX", "BLACKBERRY"};

Give the output of the following statements:

  1. System.out.println(x[1]);
  2. System.out.println(x[3].length());
  1. The output of System.out.println(x[1]); is NOKIA. x[1] gives the second element of the array x which is "NOKIA"

  2. The output of System.out.println(x[3].length()); is 8. x[3].length() gives the number of characters in the fourth element of the array x which is MICROMAX.

Next question →

Browse the free Computer Applications sample bank