Choose the correct option.
- (a)$(P \cdot Q') + (R' \cdot P)$
- (b)$(P' \cdot Q) + (R \cdot P')$
- (c)$(P' \cdot Q) \cdot (R \cdot P')$
- (d)$(P + Q') \cdot (R' + P)$
Show answer
Answer
Correct option: (b)
The ISC Computer Science 2025 Improvement Paper for Class 12: all 27 questions, 70 marks in all, in printed order and in full. It is free to download: tap "Show answer" under a question to see its answer, or use the download button to save the questions as a PDF, with or without answers; "Print this paper" below prints it as it was set.
Choose the correct option.
Answer
Correct option: (b)
Study the Assertion and Reason and choose the correct option.
Assertion: For overloaded method, signature matching happens at compile time.
Reason: The overloaded method must have a unique signature for its every prototype.
Answer
Correct option: (a)
Choose the correct option.
Answer
Correct option: (c)
Choose the correct option.
Answer
Correct option: (d)
Choose the correct option.
Answer
Correct option: (d)
Study the Assertion and Reason and choose the correct option.
Assertion: An abstract class can contain abstract as well as non-abstract methods.
Reason: Abstract classes are meant to provide complete implementation of all types of methods in its sub class.
Answer
Correct option: (c)
Study the Assertion and Reason and choose the correct option.
Assertion: If Sujata is in the merit list, then she is a topper ($Y \Rightarrow X$).
Reason: Inverse is formed when both antecedent and consequent are negated.
Answer
Correct option: (b)
Choose the correct option.
class Car extends Vehicle implements Fourwheeler
{.......}Which of the following statements are valid for the given code?
I. Vehicle is a super class and Fourwheeler is an interface.
II. Interface cannot have abstract methods.
III. Keyword extends applies to class and keyword implements applies to interface.Answer
Correct option: (c)
Differentiate between the following.
Answer
Answer the following.
int i=1, j=1, k=1, p;
while (i <= p)
{
statements
}
while (j <= p)
{
while (k <= p)
{
statements
}
}Answer
Convert the following.
Answer
Solve the following.
Answer
Final answer: 2310
Answer the following questions on the given code.
int think(int arr[ ], int f, int l)
{
if (f > l)
return 0;
else
{
int current = (arr[f] % 2 == 0) ? arr[f] : 0;
return current + think (arr, f + 1, l);
}
}Answer (a)
Answer (b)
Fill in the blanks marked ?1?, ?2? ... so that the code works.
String getPart(String str, int b, int h)
{
int beg= ?1?;
int end =b+h-1;
String g="";
while(beg<=?2? && beg>=0 && end<str.length() )
{
g+=str.charAt(beg);
?3?;
}
return g;
}Answer (a)
Blanks: b
Answer (b)
Blanks: end
Answer (c)
Blanks: beg++
Answer the following using a truth table and a Karnaugh map.
| INPUTS | |
|---|---|
| A | Order is above ₹ 1000 |
| U | Payment is done through UPI |
| P | Food is ordered from a partner restaurant |
| F | Customer uses the app for the first time |
Draw: logic gate diagram using NAND gates only for the reduced expression
Answer
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 0 | 1 | 0 |
| 0 | 0 | 1 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 1 |
| 1 | 0 | 1 | 0 | 0 |
| 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
Reduce the following using a Karnaugh map.
Draw: logic gate diagram for the reduced expression
Answer (a)
Groups: (0, 2, 4, 6) → (X + W); (1, 3, 9, 11) → (Y + W'); (0, 4, 8, 12) → (Z + W)
Reduced expression: F = (X + W)(Y + W')(Z + W)
Answer (b)

Answer the following from the logic gate diagram.

Answer (a)
| A | B | C | X |
|---|---|---|---|
| 0 | 0 | 0 | 1 |
| 0 | 0 | 1 | 1 |
| 0 | 1 | 0 | 1 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 0 |
Answer (b)
Draw the following.
Draw: logic gate diagram for an octal to binary encoder
Answer

Derive the following from the logic gate diagram.

Answer
Answer the following using a truth table.
Answer
| A | B | C | A ∧ B | A ∧ B ∧ C | (A ∧ B) ∧ C => (A ∧ B ∧ C) | (A ∧ B) <=> (A ∧ B ∧ C) | ((A ∧ B) ∧ C => (A ∧ B ∧ C)) = ((A ∧ B) <=> (A ∧ B ∧ C)) |
| 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 |
| 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 0 | 0 | 1 | 1 | 1 |
| 1 | 1 | 0 | 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
Write the program described below.
Answer
import java.util.Scanner;
class Mighty
{
int n1, n2;
int m1, m2;
Mighty()
{
n1 = 0;
n2 = 0;
m1 = 0;
m2 = 0;
}
void accept()
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter first integer (n1): ");
n1 = sc.nextInt();
System.out.print("Enter second integer (n2): ");
n2 = sc.nextInt();
}
int sumofdigits(int x)
{
if (x == 0)
return 0;
else
return (x % 10) + sumofdigits(x / 10);
}
void calMighty()
{
int s2 = n2;
while (s2 > 9)
s2 = sumofdigits(s2);
int s1 = n1;
while (s1 > 9)
s1 = sumofdigits(s1);
m1 = n1 * 10 + s2;
m2 = n2 * 10 + s1;
}
void display()
{
System.out.println("m1 = " + m1);
System.out.println("m2 = " + m2);
}
public static void main(String args[])
{
Mighty ob = new Mighty();
ob.accept();
ob.calMighty();
ob.display();
}
}Explanation: sumofdigits(x) recursively adds up the digits of x in a single pass (x%10 + sumofdigits(x/10)); calMighty() repeatedly calls it in a loop until the result is a single digit (0-9), giving the 'eventual' digit sum for n1 and n2. m1 is formed by appending the eventual digit sum of n2 to the end of n1 (n1*10 + s2), and m2 by appending the eventual digit sum of n1 to the end of n2 (n2*10 + s1). Tested: for n1=235, n2=106, the program correctly outputs m1=2357 and m2=1061, matching the example in the question.Write the program described below.
Answer
import java.util.Scanner;
class JoinArray
{
int arr[];
int size;
JoinArray(int s)
{
size = s;
arr = new int[size];
}
void accept()
{
Scanner sc = new Scanner(System.in);
for (int i = 0; i < size; i++)
{
System.out.print("Enter element: ");
arr[i] = sc.nextInt();
}
}
JoinArray attach(JoinArray P, JoinArray Q)
{
JoinArray R = new JoinArray(P.size + Q.size);
int k = 0;
for (int i = Q.size - 1; i >= 0; i--)
R.arr[k++] = Q.arr[i];
for (int i = P.size - 1; i >= 0; i--)
R.arr[k++] = P.arr[i];
return R;
}
void display()
{
for (int i = 0; i < size; i++)
System.out.print(arr[i] + " ");
System.out.println();
}
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter size of Array1: ");
int s1 = sc.nextInt();
JoinArray P = new JoinArray(s1);
P.accept();
System.out.print("Enter size of Array2: ");
int s2 = sc.nextInt();
JoinArray Q = new JoinArray(s2);
Q.accept();
JoinArray R = P.attach(P, Q);
System.out.print("Resultant Array: ");
R.display();
}
}Explanation: attach(P,Q) creates a new JoinArray R of size P.size+Q.size, first copies Q's elements from its last index down to its first index, then copies P's elements from its last index down to its first index, into R. Tested: for Array1={9,7,6,4} and Array2={8,3,2,1}, the program correctly outputs the resultant array 1 2 3 8 4 6 7 9, matching the example in the question.Write the program described below.
Answer
import java.util.Scanner;
import java.util.StringTokenizer;
class Palprime
{
String line;
Palprime()
{
line = "";
}
void input()
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter a sentence: ");
line = sc.nextLine().toUpperCase();
}
boolean isPalin(String n)
{
int i = 0, j = n.length() - 1;
while (i < j)
{
if (n.charAt(i) != n.charAt(j))
return false;
i++;
j--;
}
return true;
}
boolean primelen(String n)
{
int len = n.length();
if (len < 2)
return false;
for (int i = 2; i <= len / 2; i++)
{
if (len % i == 0)
return false;
}
return true;
}
void display()
{
StringTokenizer st = new StringTokenizer(line, " ");
String result = "";
while (st.hasMoreTokens())
{
String word = st.nextToken();
if (isPalin(word) && primelen(word))
{
if (result.length() > 0)
result += ", ";
result += word;
}
}
System.out.println("Palprime words: " + result);
}
public static void main(String args[])
{
Palprime ob = new Palprime();
ob.input();
ob.display();
}
}Explanation: isPalin() checks a word for being a palindrome by comparing characters from both ends inward. primelen() checks whether the word's length is a prime number. display() tokenizes the sentence into words and prints every word for which both isPalin() and primelen() return true. Tested with 'MY MOM POSSESSES A GOOD LEVEL OF KNOWLEDGE IN MALAYALAM', the program correctly outputs 'MOM, LEVEL', matching the example in the question.Answer the following on the class described.
Answer (i)
void add(int val)
{
if ((rear + 1) % cap == front)
System.out.println("QUEUE IS FULL");
else
{
q[rear] = val;
rear = (rear + 1) % cap;
}
}
int remove()
{
if (front == rear)
return -999;
int val = q[front];
front = (front + 1) % cap;
return val;
}Explanation: add() checks whether inserting at rear would collide with front (queue full) using modulo arithmetic to wrap around the array; if not full it stores val at q[rear] and advances rear circularly. remove() checks for an empty queue (front==rear) returning -999 in that case; otherwise it returns the element at front and advances front circularly. Tested with cap=4: after add(10),add(20),add(30), remove() correctly returns 10; then add(40) succeeds but a further add(50) correctly prints 'QUEUE IS FULL', and the queue then displays as 20 30 40.Answer (ii)
Write the program described below.
Answer
class Booking extends Train
{
int numPassengers;
double groupDiscount;
double totalCost;
Booking(String tn, int tno, double tp, int np)
{
super(tn, tno, tp);
numPassengers = np;
groupDiscount = 0.0;
totalCost = 0.0;
}
void calCost()
{
totalCost = ticketPrice * numPassengers;
if (numPassengers > 5)
{
groupDiscount = 10.0;
totalCost = totalCost - (totalCost * groupDiscount / 100);
}
}
void displayDetails()
{
super.displayDetails();
System.out.println("Number of Passengers: " + numPassengers);
System.out.println("Group Discount: " + groupDiscount + "%");
System.out.println("Total Cost: " + totalCost);
}
}Explanation: Booking extends Train, so it inherits trainName, trainNumber and ticketPrice. Its constructor calls super(...) to initialise the inherited members and then sets its own. calCost() computes the base cost (ticketPrice * numPassengers) and applies a 10% group discount only if numPassengers > 5. displayDetails() calls super.displayDetails() to show the train details, then prints the booking-specific details. Tested (with a stub Train class and main): for ticketPrice=1500.0 and numPassengers=7 (>5), the program correctly computes groupDiscount=10.0% and totalCost = 1500*7 - 10% = 9450.0.Write the program described below.
class VotersList
{
int age;
VotersList link;
}Write an Algorithm OR a Method to count and return total number of nodes whose age >= 60.
The method prototype is as follows:
int countNodes(VotersList start)Answer
int countNodes(VotersList start)
{
if (start == null)
return 0;
else
{
if (start.age >= 60)
return 1 + countNodes(start.link);
else
return countNodes(start.link);
}
}Explanation: The method recursively traverses the linked list node by node using the link reference. At each node, if age is 60 or more it adds 1 to the count returned by the recursive call on the rest of the list (start.link); otherwise it simply returns the count from the rest of the list. The base case (start == null) returns 0 when the end of the list is reached. Tested with a 4-node list of ages {65, 45, 70, 30}, the method correctly returns 2 (the nodes with age 65 and 70).Answer the following questions from the binary tree.
Answer (a)
Answer (b)
Answer (c)
The ISC Computer Science 2025 Improvement Paper is a improvement paper for Class 12: 27 questions in printed order, 70 marks in all, asked from 9 chapters. An improvement paper is the paper of the improvement examination, which candidates who sit a subject again to improve their marks take.
The layout of the current Computer Science paper (sections, marks, choices) is in the paper pattern guide.
| Kind | Questions | Marks printed* |
|---|---|---|
| Program | 5 | 37 |
| Case based | 7 | 34 |
| MCQ | 5 | 5 |
| Drawing | 1 | 5 |
| Assertion-reason | 3 | 3 |
| Derivation | 1 | 3 |
| Conversion | 1 | 2 |
| Numerical | 1 | 2 |
| Truth table | 1 | 2 |
| Differentiate | 1 | 1 |
| Short answer | 1 | 1 |
| Chapter | Questions | Marks printed* |
|---|---|---|
| Objects | 3 | 30 |
| Boolean Algebra | 10 | 26 |
| Data structures | 4 | 12 |
| Computer Hardware | 2 | 10 |
| Inheritance, Interfaces and Polymorphism | 4 | 8 |
| Implementation of algorithms to solve problems | 1 | 3 |
| Recursion | 1 | 3 |
| Arrays, Strings | 1 | 2 |
| Complexity and Big O notation | 1 | 1 |
* Marks are those printed on each question; where a question offers an either-or choice, both options are counted, so the totals can come to more than the paper’s own total.
27 questions, 70 marks in all, shown in full and in printed order on this page.
By number of questions: Boolean Algebra (10), Data structures (4), Inheritance, Interfaces and Polymorphism (4) and Objects (3).
Tap “Show answer” under a question to see its answer. The download button saves the paper as a PDF, with or without the answers.