ICSE 2011 Computer Applications Question Paper
ICSE 2011 Computer Applications Question Paper
(Theory)
(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 in reading the question paper.
The time given at the head of this Paper is the time allowed for writing the answers.
Question 1.
Question 2.
(a) State the total size in bytes, of the arrays a[4] of char data type and
p [4] of float data type. [2]
(b) (i) Name the package that contains Scanner class.
(ii) Which unit of the class gets called, when the object of the class is
created? [2]
(c) Give the output of the following:
String n = "Computer Knowledge";
String m = "Computer Applications";
System.out.println(n.substring(0,8).concat(m.substring(9)));
System.out.println(n.endsWith("e")); [2]
This Paper consists of 4 printed pages.
T11 861 © www.javaforschool.com Turn over
(d) Write the output of the following:
(i) System.out.println (Character.isUpperCase(‘R’));
(ii) System.out.println(Character.toUpperCase(‘j’)); [2]
(e) What is the role of keyword void in declaring functions? [2]
Question 3.
(a) Analyse the following program segment and determine how many times the
loop will be executed and what will be the output of the program segment?
int p = 200;
while(true)
{
if (p<100)
break;
p=p-20;
}
System.out.println(p); [2]
(b) What will be the output of the following code?
(i) int k = 5, j = 9;
k+= k++ – ++j + k;
System.out.println(“k= ” +k);
System.out.println(“j= ” +j); [2]
(ii) double b = -15.6;
double a = Math.rint(Math.abs(b));
System.out.println(“a=” +a); [2]
(c) Explain the concept of constructor overloading with an example. [2]
(d) Give the prototype of a function search which receives a sentence sentnc
and a word wrd and returns 1 or 0 ? [2]
+
(e) Write an expression in Java for z= . [2]
+
2
T11 861 © www.javaforschool.com
(h) What are library classes? Give an example. [2]
(i) Write one difference between Linear Search and Binary Search. [2]
Question 4.
Question 5.
Write a program to input and sort the weight of ten people. Sort and display them
in descending order using the selection sort technique. [15]
3
T11 861 © www.javaforschool.com Turn over
Question 6.
Write a program to input a number and print whether the number is a special
number or not.
(A number is said to be a special number, if the sum of the factorial of the digits of
the number is same as the original number).
Example : 145 is a special number, because 1!+4!+5! = 1+24+120 = 145
(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, example 5!= 1*2*3*4*5=120). [15]
Question 7.
Question 8.
Question 9.
Write a menu driven program to perform the following: (Use switch – case statement)
4
T11 861 © www.javaforschool.com