(a) Give one example each of a primitive data type and a composite data type.

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

11 Mark · 2012 · Section A · 2012 Paper

(a) Give one example each of a primitive data type and a composite data type.

Show SolutionHide Solution↓
  1. int
  2. array

(b) Give one point of difference between unary and binary operators.

unary operators operate on a single operand whereas binary operators operate on two operands.

(c) Differentiate between call by value or pass by value and call by reference or pass by reference.

Call by valueCall by reference
Values of actual parameters are copied to formal parameters.Reference of actual parameters is passed to formal parameters.
Changes made to formal parameters are not reflected back to actual parameters.Changes made to formal parameters are reflected back to actual parameters.

(d) Write a Java expression for:

$\sqrt{2as + u^2}$

Math.sqrt(2 * a * s + u * u)

(e) Name the type of error (syntax, runtime or logical error) in each case given below:

  1. Division by a variable that contains a value of zero.
  2. Multiplication operator used when the operation should be division.
  3. Missing semicolon.
  1. Runtime error
  2. Logical error
  3. syntax error
Next question →

Browse the free Computer Applications sample bank