BHAKTIVEDANTA GURUKULA & INTERNATIONAL SCHOOL
PERIODIC ASSESSMENT - 1 (2025-2026)
SUBJECT : Computer Science
TIME:- 90 Minutes GRADE : 12 MM : 40 Marks
NAME ___________________ ROLL NO. ________ DATE ________
General Instructions:
1) All questions are compulsory.
2) Answer the questions as per the instructions given.
3) Marks assigned to each question are indicated against it.
4) Neatness should be maintained.
Section A (Each question - 2 Marks)
1. Give the term used for descriptions given below:
a. It is a variable which is created in static memory and serves as
a single copy for all the objects.
b. It is variable declared within a member method whose
existence is only within the method.
2. Explain in brief the two types of polymorphism.
3. Which of the following in not a primitive data type?
a. int
b. double
c. long
d. array
4. Predict the value of ‘st’, when a=90:
String st = (a>=90)?”Excellent”:”Best”;
5. Given: x+= x++ + ++x + --x
Find the value, when x = 5.
PA-1, GD 12, CA, PAGE 1
Section B (Each question - 5 Marks)
1. What is meant by an ‘Abstract Class’? What is need of an Abstract
class?
2. Give the final value of q at the end of the following program segment
after execution:
for(m=2;m<=3;++m)
{
for(n=1;n<=m;++n)
{
p = m+ n-1;
if(p%3 == 0)
q+ = p;
else
q+= p+4;
}
}
3. Write an algorithm to sort N number of elements in ascending order
by using bubble sort technique.
Section B (Each question - 7.5 Marks)
1. Write a menu driven program to perform the given tasks as per the
user’s choice:
i. To enter a number containing three digits or more.
Arrange the digits of the entered number in ascending order
and display the result.
Sample Input: Enter a number 4972
Sample Output: 2, 4, 7, 9
ii. A number is said to be ‘Magic Number’, if eventual sum of the
digits of the number is equal to 1, otherwise not. Enter a
number and check whether it is a magic number or not.
Sample Input: Enter a number 55
Then, 5+5 = 10, 1 + 0 = 1
PA-1, GD 12, CA, PAGE 2
Sample Output: Hence, 55 is a magical number.
Similarly, 289 is a magic number.
2. Write a program in Java to accept two strings. Display the new
strings by taking each character of the first string from left to right
and of the second string from right to left. The letters should be
taken alternatively from each string.
Assume that the length of both the strings are same.
Sample Input: String 1: HISTORY
String 2: SCIENCE
Sample Output: HEICSNTEOIRCYS
PA-1, GD 12, CA, PAGE 3