Isc 2012 Computer Science Practical Question Paper PDF
Isc 2012 Computer Science Practical Question Paper PDF
Paper – 2
(PRACTICAL)
(Reading Time: 15 minutes)
(Planning Session AND Examination Session: Three Hours)
———————————————————————————————-------------————
The total time to be spent on the Planning and the Examination Session is Three hours.
After completing the Planning Session, the candidate may begin with the Examination Session.
A maximum of 90 minutes is permitted to begin the Examination Session.
However, if candidates finish earlier, they are to be permitted to begin the Examination Session.
(Maximum Marks: 80)
———————————————————————————————-------------————
Question 1
A prime palindrome integer is a positive integer (without leading zeros) which is prime as
well as a palindrome. Given two positive integers m and n, where m < n, write a program to
determine how many prime-palindrome integers are there in the range between m and n
(both inclusive) and output them.
The input contains two positive integers m and n where m < 3000 and n < 3000. Display
the number of prime-palindrome integers in the specified range along with their values in the
format specified below:
Test your program with the sample data and some random data:
Example 1
INPUT: m = 100
n = 1000
Example 2
INPUT: m = 100
n = 5000
Question 2
Write a program to accept a sentence as input. The words in the string are to be
separated by a blank. Each word must be in upper case. The sentence is terminated by
either “.”,”!” or “?”. Perform the following tasks:
2
1212-868B © www.javaforschool.com
Test your program with the sample data and some random data:
Example 1
INPUT:
NECESSITY IS THE MOTHER OF INVENTION.
OUTPUT:
LENGTH : 6
REARRANGED SENTENCE
Example 2
INPUT:
BE GOOD TO OTHERS.
OUTPUT:
LENGTH : 4
REARRANGED SENTENCE
BE GOOD OTHERS TO
Question 3
(b) Find the maximum and minimum value in the matrix and display them along
with their position.
(c) Sort the elements of the matrix in ascending order using any standard sorting
technique and rearrange them in the matrix.
3
1212-868B © www.javaforschool.com Turn over
Test your program with the sample data and some random data:
Example 1
INPUT : M=3
N=4
8 7 9 3
-2 0 4 5
1 3 6 -4
OUTPUT :
ORIGINAL MATRIX
8 7 9 3
-2 0 4 5
1 3 6 -4
LARGEST NUMBER : 9
ROW = 0
COLUMN = 2
SMALLEST NUMBER : -4
ROW = 2
COLUMN = 3
REARRANGED MATRIX
-4 -2 0 1
3 3 4 5
6 7 8 9
Example 2
INPUT : M=3
N = 22
4
1212-868B © www.javaforschool.com