2017 Specimen Paper Computer Applications
2017 Specimen Paper Computer Applications
2017 Specimen Paper Computer Applications
(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.
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 (40 Marks)
Attempt all questions
Question 1
(a)
[2]
(b)
[2]
(c)
(d)
What is an identifier?
Write an expression in Java for
[2]
[2]
(e)
cos x +
b .
[2]
Question 2
(a)
(b)
[2]
[2]
(c)
[2]
(d)
[2]
140
(e)
[2]
Question 3
(a)
[2]
(b)
[2]
(c)
String s = application;
int p = s.indexOf(a);
System.out.println(p);
System.out.println(p+s);
(ii)
String st = PROGRAM;
System.out.println(st.indexOf(st.charAt(4)));
(iii)
[2]
[2]
int a = 0;
if(a>0 && a<20)
a++;
else a-- ;
System.out.println(a);
(iv)
[2]
int a= 5, b = 2,c;
if (a>b || a ! = b)
c = ++a+--b;
System.out.print(c+ +a+ +b);
(v)
[2]
int i = 1;
while(i++<=1)
{
i++;
System.out.print(i + );
}
System.out.print(i);
[2]
(d)
(e)
(f)
[2]
[2]
[2]
[15]
Question 5
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).
[15]
Question 6
Write a program to accept a sentence and print only the first letter of each word of the
sentence in capital letters separated by a full stop.
Example :
INPUT SENTENCE :
OUTPUT :
This is a cat
T.I.A.C.
[15]
Question 7
Write a program to create an array to store 10 integers and print the largest integer and
the smallest integer in that array.
[15]
Question 8
Write a program to calculate the sum of all the prime numbers between the range of
1 and 100.
[15]
Question 9
Write a program to store 10 names in an array. Arrange these in alphabetical order by
sorting. Print the sorted list. Take single word names, all in capital letters,
e.g. SAMSON, AJAY, LUCY, etc.
[15]