Choose the correct option.
- (a)$(A + B') \cdot (B' + C)$
- (b)$(A' \cdot B) + (B \cdot C')$
- (c)$(A' + B) \cdot (B + C')$
- (d)$(A \cdot B') + (B \cdot C')$
Show answer
Answer
Correct option: (c)
The ISC Computer Science 2025 Question 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: (c)
Study the Assertion and Reason and choose the correct option.
Assertion: The expression $\sim ( X \vee Y )$ is logically equivalent to $(\sim X \wedge \sim Y)$
Reason: The commutative property of logical operators states that the order of the operands does not change the result of a binary operation.
Answer
Correct option: (b)
Choose the correct option.
Answer
Correct option: (b)
Choose the correct option.
Answer
Correct option: (d)
Choose the correct option.
public class Person
{ int age;
public Person (int age)
{
this.age = age;
}
}Which of the following statements are valid for the given code?
I. The keyword this in the constructor refers to the current instance of the class.
II. The keyword this differentiates between the instance variable age and the parameter age.
III. The keyword this can be used only in constructors.Answer
Correct option: (a)
Study the Assertion and Reason and choose the correct option.
Assertion: The break statement prevents fall through effect in switch case construct.
Reason: The break statement enables unnatural exit from the loop.
Answer
Correct option: (b)
Choose the correct option.
Answer
Correct option: (a)
Study the Assertion and Reason and choose the correct option.
Assertion: If it is not a Sunday, then it is not a holiday. ($Q' \Rightarrow P'$)
Reason: Inverse is formed when antecedent and consequent are interchanged.
Answer
Correct option: (c)
Answer the following.
for ( int i=1; i<=P; i++)
{ Statements }
for (int j=1; j<=P; ++j)
for (int k=1; k<=Q; k++)
{ Statements }Answer
Answer the following.
| A | B | X |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
Answer
Convert the following.
Answer
Solve the following.
Answer
Final answer: 1266
Answer the following questions on the given code.
int solve(int m, int n)
{
int k=1;
if(m<0)
return -k;
else if(m==0)
return m;
else
return k+(solve(m-n, n+2));
}Answer (a)
Answer (b)
Fill in the blanks marked ?1?, ?2? ... so that the code works.
boolean duck(int a)
{ int f=-1;
if(a==0)
return true;
for(int i=a; i!=0;?1?)
{ int c = i%10;
if(c==?2?)
{f=1; break; }
}
return (f==?3?)? false:true;
}Answer (a)
Blanks: i = i / 10
Answer (b)
Blanks: 0
Answer (c)
Blanks: -1
Answer the following using a truth table and a Karnaugh map.
| INPUTS | |
|---|---|
| A | Superhero has Avengers membership. |
| S | Superhero holds a special permit issued by S.H.I.E.L.D. |
| C | Superhero possesses a high-security clearance badge |
| L | Superhero is a recognised ally |
Draw: logic gate diagram using NOR gates only for the reduced expression
Answer
| A | S | C | L | X |
| 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 | 0 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 | 0 |
| 1 | 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
Reduce the following using a Karnaugh map.
Draw: logic gate diagram using NAND gates only for the reduced expression
Answer (a)
Groups: (5, 7, 13, 15) → QS; (0, 1, 8, 9) → Q'R'; (0, 2, 8, 10) → Q'S'
Reduced expression: F = QS + Q'R' + Q'S'
Answer (b)

Answer the following from the logic gate diagram.

Answer (a)
Answer (b)
Draw the following.
Draw: logic gate diagram for an octal to binary encoder
Answer

Answer the following using a truth table.
Answer
| X | Y | ~X | ~X => Y | (~X => Y) ∧ X | X ∧ ~Y | X ∧ Y | (X ∧ ~Y) ∨ (X ∧ Y) | (~X => Y) ∧ X <=> (X ∧ ~Y) ∨ (X ∧ Y) |
| 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
| 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 |
| 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 1 |
Answer the following from the logic gate diagram.

Answer (a)
Answer (b)
Write the program described below.
Answer
import java.util.Scanner;
class Perni
{
String num;
Perni()
{
num = "0";
}
void accept()
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter a binary number: ");
num = sc.next();
}
int countOne(int k)
{
if (k == 0)
return 0;
return (k % 10) + countOne(k / 10);
}
void check()
{
int k = Integer.parseInt(num);
int count = countOne(k);
boolean prime = (count > 1);
for (int i = 2; i * i <= count && prime; i++)
{
if (count % i == 0)
prime = false;
}
if (prime)
System.out.println(num + " is a Pernicious number.");
else
System.out.println(num + " is NOT a Pernicious number.");
}
public static void main(String[] args)
{
Perni obj = new Perni();
obj.accept();
obj.check();
}
}Explanation: accept() reads the binary number as a String (to allow digits like 1010 to be parsed digit-wise) and converts it with Integer.parseInt so countOne() can extract digits by %10/10. countOne(k) recursively adds up the digits of k (which, since k only has 0s and 1s, gives the count of 1's). check() then tests whether that count is prime and prints the appropriate message. Tested: 101 -> Pernicious (2 ones), 10110 -> Pernicious (3 ones), 1111 -> NOT Pernicious (4 ones).Write the program described below.
| 2 | 3 | 1 |
| 7 | 5 | 6 |
| 1 | 4 | 2 |
| 7 | 4 | 2 |
| 1 | 3 | 1 |
| 2 | 5 | 6 |
Answer
import java.util.Scanner;
class Colsum
{
int mat[][];
int m, n;
Colsum(int mm, int nn)
{
m = mm;
n = nn;
mat = new int[m][n];
}
void readArray()
{
Scanner sc = new Scanner(System.in);
for (int i = 0; i < m; i++)
for (int j = 0; j < n; j++)
mat[i][j] = sc.nextInt();
}
boolean check(Colsum A, Colsum B)
{
for (int j = 0; j < A.n; j++)
{
int sumA = 0, sumB = 0;
for (int i = 0; i < A.m; i++)
{
sumA += A.mat[i][j];
sumB += B.mat[i][j];
}
if (sumA != sumB)
return false;
}
return true;
}
void print()
{
for (int i = 0; i < m; i++)
{
for (int j = 0; j < n; j++)
System.out.print(mat[i][j] + " ");
System.out.println();
}
}
public static void main(String[] args)
{
Colsum A = new Colsum(3, 3);
A.readArray();
Colsum B = new Colsum(3, 3);
B.readArray();
if (A.check(A, B))
System.out.println("Sum of corresponding columns is equal.");
else
System.out.println("Sum of corresponding columns is not equal.");
}
}Explanation: check(A,B) sums each column of A and the corresponding column of B and compares them; it returns false as soon as any pair of column sums differ, else true after checking all columns. Tested with the example matrices from the question - output: "Sum of corresponding columns is equal." (column sums 10,12,9 match on both sides).Write the program described below.
Answer
class Flipgram
{
String word;
Flipgram(String s)
{
word = s;
}
boolean ishetero()
{
for (int i = 0; i < word.length(); i++)
{
for (int j = i + 1; j < word.length(); j++)
{
if (word.charAt(i) == word.charAt(j))
return false;
}
}
return true;
}
String flip()
{
int len = word.length();
int half = len / 2;
String left = word.substring(0, half);
String right = (len % 2 == 0) ? word.substring(half) : word.substring(half + 1);
String mid = (len % 2 == 0) ? "" : word.substring(half, half + 1);
return right + mid + left;
}
void display()
{
if (ishetero())
System.out.println("HETEROGRAM");
else
System.out.println(flip());
}
public static void main(String[] args)
{
Flipgram f1 = new Flipgram("BETTER");
f1.display();
Flipgram f2 = new Flipgram("NEVER");
f2.display();
Flipgram f3 = new Flipgram("THAN");
f3.display();
}
}Explanation: ishetero() checks every pair of characters for a repeat; if none repeats, the word is a heterogram. flip() splits the word into left and right halves (keeping the middle letter fixed for odd-length words) and returns right+mid+left. display() prints "HETEROGRAM" for a heterogram, otherwise the flipped word. Tested: BETTER -> TERBET, NEVER -> ERVNE, THAN -> HETEROGRAM (all letters distinct), matching the question's examples.Answer the following on the class described.
Answer (i)
void push(int v)
{
if ((rear + 1) % cap == front)
System.out.println("QUEUE IS FULL");
else
{
Q[rear] = v;
rear = (rear + 1) % cap;
}
}
int remove()
{
if (front == rear)
return -999;
int val = Q[front];
front = (front + 1) % cap;
return val;
}Explanation: push() adds v at the rear index and advances rear circularly (using %cap), but first checks whether the next rear position would collide with front (queue full). remove() checks for an empty queue (front==rear) and returns -999 in that case; otherwise it returns the element at front and advances front circularly. Tested and working correctly for wraparound and full/empty conditions.Answer (ii)
Write the program described below.
Answer
class Passenger extends Flight
{
int id;
String name;
double tax, tot;
Passenger(String fn, String dt, String at, double bf, int i, String n)
{
super(fn, dt, at, bf);
id = i;
name = n;
tax = 0.0;
tot = 0.0;
}
void cal()
{
tax = 0.05 * basefare;
tot = basefare + tax;
}
void show()
{
super.show();
System.out.println("Passenger ID: " + id);
System.out.println("Passenger Name: " + name);
System.out.println("Tax: " + tax);
System.out.println("Total Amount: " + tot);
}
}Explanation: Passenger extends Flight. Its constructor calls super(...) to initialise the inherited Flight data members, then sets its own. cal() computes tax as 5% of basefare (inherited from Flight) and the total as basefare+tax. show() calls super.show() to print the flight details, then prints the passenger details and total. Tested (with a stub Flight class and main) - correctly prints flight details, tax = 250.0 and total = 5250.0 for a base fare of 5000.0.Write the program described below.
class Cell
{
char m;
Cell right;
}Write an Algorithm OR a Method to print the sum of the ASCII values of the lower case alphabets present in the linked list.
The method declaration is as follows:void lowercase(Cell str)Answer
void lowercase(Cell str)
{
int sum = 0;
Cell temp = str;
while (temp != null)
{
if (temp.m >= 'a' && temp.m <= 'z')
sum = sum + (int) temp.m;
temp = temp.right;
}
System.out.println("Sum of ASCII values of lowercase letters = " + sum);
}The method traverses the linked list from the given node str to the end (right==null), adds the ASCII value of every lower-case character found (checked with the range 'a' to 'z') to sum, and finally prints the total.Answer the following questions from the binary tree.
Answer (a)
Answer (b)
Answer (c)
The ISC Computer Science 2025 Question Paper is a board paper for Class 12: 27 questions in printed order, 70 marks in all, asked from 11 chapters. The board paper is the exam itself: the question paper CISCE set for that year’s ISC candidates. Solve it in one sitting, in the time allowed, to see how questions are worded and how hard the real paper is.
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 | 8 | 36 |
| MCQ | 5 | 5 |
| Drawing | 1 | 5 |
| Assertion-reason | 3 | 3 |
| Truth table | 1 | 3 |
| Short answer | 2 | 2 |
| Conversion | 1 | 2 |
| Numerical | 1 | 2 |
| Chapter | Questions | Marks printed* |
|---|---|---|
| Boolean Algebra | 11 | 30 |
| Objects | 3 | 30 |
| Data structures | 4 | 12 |
| Computer Hardware | 2 | 7 |
| Inheritance, Interfaces and Polymorphism | 1 | 5 |
| Implementation of algorithms to solve problems | 1 | 3 |
| Recursion | 1 | 3 |
| Arrays, Strings | 1 | 2 |
| Complexity and Big O notation | 1 | 1 |
| Methods | 1 | 1 |
| Statements, Scope | 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 (11), Data structures (4), Objects (3) and Computer Hardware (2).
Tap “Show answer” under a question to see its answer. The download button saves the paper as a PDF, with or without the answers.