Choose the correct option.
- (a)$A' \cdot (B + C + B' + C)$
- (b)$A + (B + C') \cdot (B + C')$
- (c)$A + (B' + C) \cdot (B + C')$
- (d)$A' \cdot (B' + C' + B' \cdot C)$
Show answer
Answer
Official answer keyCorrect option: (c)
The ISC Computer Science 2025 Specimen 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
Official answer keyCorrect option: (c)
Study the Assertion and Reason and choose the correct option.
Assertion: Recursion utilises more memory as compared to iteration.
Reason: Time complexity of recursion is higher due to the overhead of maintaining the function call stack.
Answer
Official answer keyCorrect option: (b)
Choose the correct option.
Answer
Official answer keyCorrect option: (b)
Choose the correct option.
Answer
Official answer keyCorrect option: (a)
Choose the correct option.
Answer
Official answer keyCorrect option: (c)
Study the Assertion and Reason and choose the correct option.
Assertion: s2 is converse of s1
Reason: Three-sided polygon must be a triangle.
Answer
Official answer keyCorrect option: (b)
Study the Assertion and Reason and choose the correct option.
Assertion: In Java, the String class is used to create and manipulate strings, and it is immutable.
Reason: Immutability ensures that once a String object is created, its value cannot be changed.
Answer
Official answer keyCorrect option: (a)
Choose the correct option.
static final double pi = 3.142;Which of the following statements are valid for pi?
I. It contains a common value for all objects class Circle.
II. Its value is non-changeable.
III. At a time two access modifiers, static and final, cannot be applied to a single data member pi.Answer
Official answer keyCorrect option: (a)
Answer the following.
Answer
Official answer keyAnswer the following.
Answer
Official answer keyConvert the following.
Answer
Official answer keySolve the following.
Answer
Official answer keyFinal answer: 1337
Answer the following questions on the given code.
public int getIt(int x,intarr[],int f,int l)
{
if(f>l)
return -1;
int m=(f+l)/2;
if(arr[m]<x)
return getIt(x,m+1,l);
else if(arr[m]>x)
return getIt(x,f,m-1);
else
return m;
} Answer (a)
Official answer keyAnswer (b)
Official answer keyFill in the blanks marked ?1?, ?2? ... so that the code works.
public int sumOfPowers(int num)
{
if (num == 0)
return ?1?;
int digit = ?2?;
return (int) Math.pow(digit, 3) + ?3?;
} Answer (a)
Official answer keyBlanks: 0
Answer (b)
Official answer keyBlanks: num % 10
Answer (c)
Official answer keyBlanks: sumOfPowers(num / 10)
Answer the following using a truth table and a Karnaugh map.
| INPUTS | |
|---|---|
| E | Employee of the mall |
| R | Regular customer of the mall |
| S | Service of the employee is more than 10 years |
| C | Senior citizen of 65 years or above |
Draw: logic gate diagram for the reduced expression
Answer
Official answer key| E | R | S | C | X |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 0 | 1 | 1 |
| 0 | 0 | 1 | 0 | 0 |
| 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 0 | 1 |
| 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 0 | 1 | 1 | 1 | 0 |
| 1 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 1 | 1 |
| 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 for the reduced expression
Answer (a)
Official answer keyGroups: (0, 1, 8, 9) → (Q + R); (4, 5, 6, 7) → (P + Q'); (0, 2, 4, 6) → (P + S)
Reduced expression: F = (Q + R)(P + Q')(P + S)
Answer (b)
Official answer keyAnswer the following from the logic diagram.

Answer (a)
Official answer key| A | B | C | (A.B)' | B'.C | (A.B)'+B'.C | X |
|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 | 1 | 0 |
| 0 | 0 | 1 | 1 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 0 | 1 | 0 |
| 0 | 1 | 1 | 1 | 0 | 1 | 0 |
| 1 | 0 | 0 | 1 | 0 | 1 | 0 |
| 1 | 0 | 1 | 1 | 1 | 1 | 0 |
| 1 | 1 | 0 | 0 | 0 | 0 | 1 |
| 1 | 1 | 1 | 0 | 0 | 0 | 1 |
Answer (b)
Official answer keyFinal answer: 0
Draw the following.
Draw: logic circuit to decode the binary numbers 0001, 0101, 0111, 1000, 1010, 1100, 1110, 1111 to their hexadecimal equivalents
Answer
Official answer keyAnswer the following using a truth table.
Answer
Official answer key| X | Y | Z | X.Y | X.Y => Z | Y => Z | X => Y | (Y => Z).(X => Y) | X.Y => Z <=> (Y => Z).(X => Y) |
| 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 |
| 0 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 |
| 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
Answer the following from the logic gate diagram.

Answer (a)
Official answer keyAnswer (b)
Official answer keyWrite the program described below.
Answer
Official answer keyimport java.util.Scanner;
class StringOp
{
String str; // original string
String msk; // mask string
String nstr; // resultant string
StringOp()
{
str = "";
msk = "";
nstr = "";
}
void accept()
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter the original string:");
str = sc.nextLine().toLowerCase();
System.out.println("Enter the mask string:");
msk = sc.nextLine().toLowerCase();
}
void form()
{
for (int i = 0; i < str.length(); i++)
{
char ch = str.charAt(i);
if (msk.indexOf(ch) == -1)
nstr = nstr + ch;
}
}
void display()
{
System.out.println("Original string : " + str);
System.out.println("New string : " + nstr);
}
public static void main(String args[])
{
StringOp ob = new StringOp();
ob.accept();
ob.form();
ob.display();
}
}Explanation: The constructor initialises str, msk and nstr to empty strings. accept() reads the original string and the mask string, converting both to lower case as required. form() scans every character of str and appends it to nstr only if it does not occur anywhere in msk (String.indexOf returns -1 when the character is absent), which effectively removes every character of msk from str. display() prints both strings. Tested for str="communication", msk="mont": the program correctly outputs nstr="cuicai" (verified by running the code), matching the example in the question.Write the program described below.
Answer
Official answer keyimport java.util.Scanner;
class Mixarray
{
int arr[];
int cap;
Mixarray(int mm)
{
cap = mm;
arr = new int[cap];
}
void input()
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter " + cap + " elements:");
for (int i = 0; i < cap; i++)
arr[i] = sc.nextInt();
}
Mixarray mix(Mixarray P, Mixarray Q)
{
Mixarray res = new Mixarray(6);
int k = 0;
for (int i = 0; i < 3; i++)
res.arr[k++] = P.arr[i];
for (int i = 0; i < 3; i++)
res.arr[k++] = Q.arr[i];
return res;
}
void display()
{
System.out.println("Resultant array:");
for (int i = 0; i < cap; 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 capacity of first array (>=3): ");
int c1 = sc.nextInt();
Mixarray P = new Mixarray(c1);
P.input();
System.out.print("Enter capacity of second array (>=3): ");
int c2 = sc.nextInt();
Mixarray Q = new Mixarray(c2);
Q.input();
Mixarray R = new Mixarray(6);
Mixarray res = R.mix(P, Q);
res.display();
}
}Explanation: mix(P,Q) creates a new Mixarray object of capacity 6, copies the first three elements of P into it followed by the first three elements of Q, and returns it. Tested with Array1={78,90,100,45,67} and Array2={10,67,200,90}: the program correctly outputs the resultant array 78 90 100 10 67 200 (verified by running the code), matching the example in the question.Write the program described below.
Answer
Official answer keyimport java.util.Scanner;
class LCM
{
int n1, n2;
int large, sm;
int l;
LCM()
{
n1 = 0; n2 = 0;
large = 0; sm = 0;
l = 0;
}
void accept()
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter first number : ");
n1 = sc.nextInt();
System.out.print("Enter second number : ");
n2 = sc.nextInt();
large = (n1 > n2) ? n1 : n2;
sm = (n1 > n2) ? n2 : n1;
}
int getLCM()
{
if (large % sm == 0)
return (n1 * n2) / sm;
else
{
int temp = large;
large = sm;
sm = temp % sm;
return getLCM();
}
}
void display()
{
l = getLCM();
System.out.println("N1 = " + n1);
System.out.println("N2 = " + n2);
System.out.println("LCM = " + l);
}
public static void main(String args[])
{
LCM ob = new LCM();
ob.accept();
ob.display();
}
}Explanation: getLCM() recursively computes the GCD of large and sm using the Euclidean algorithm (large % sm == 0 is the base case; otherwise it sets large=sm, sm=large%sm and recurses), then applies the relation LCM = (n1*n2)/GCD. Tested for n1=12, n2=18: the program correctly outputs LCM=36 (verified by running the code).Answer the following on the class described.
Answer (i)
Official answer keyvoid pushfront(int v)
{
if (front != 0)
ele[front--] = v;
else
System.out.println("full from front");
}
int poprear()
{
if (front != rear)
return ele[rear--];
else
return -999;
}Explanation: This follows the same indexing scheme used by the already-defined pushrear()/popfront() methods of ReCycle. pushfront() stores the new value at the current front index and then decrements front (so ele[] fills from the front end downward), printing "full from front" if front has already reached 0 (no more room at that end). poprear() removes and returns the element at the current rear index and then decrements rear, unless front and rear have met (the structure is empty), in which case it returns -999.Answer (ii)
Official answer keyWrite the program described below.
| Number of excess days | Fine per day (Rs.) |
|---|---|
| 1 to 5 | 2.00 |
| 6 to 10 | 3.00 |
| Above 10 | 5.00 |
Answer
Official answer keyclass Compute extends Library
{
int d; // number of days taken in returning the book
double f; // fine
Compute(String name, String author, double p, int d)
{
super(name, author, p);
this.d = d;
f = 0.0;
}
void fine()
{
int excess = d - 7;
if (excess <= 0)
f = 0.0;
else if (excess <= 5)
f = excess * 2.0;
else if (excess <= 10)
f = excess * 3.0;
else
f = excess * 5.0;
}
void show()
{
super.show();
System.out.println("Number of days : " + d);
System.out.println("Fine : " + f);
System.out.println("Total amount : " + ((0.02 * p * d) + f));
}
}Explanation: Compute extends Library, so its constructor calls super(name, author, p) to initialise the inherited data members, then sets d. fine() computes the excess days beyond the free 7-day period and applies the given tiered rate (Rs.2/day for 1-5 excess days, Rs.3/day for 6-10, Rs.5/day beyond 10; 0 if not overdue). show() calls super.show() to print the book details, then prints the days, fine and total amount, calculated as (2% of price x total days) + fine. Tested (with a stub Library class) for price=500.0, d=12: excess=5, so fine=10.0 and total=(0.02x500x12)+10=130.0, matching manual calculation (verified by running the code).Write the program described below.
class Node
{
int n;
Node link;
} Write an Algorithm OR a Method to search for a number from an existing linked list.
The method declaration is as follows:
void FindNode( Node str, int b )Answer
Official answer keyvoid FindNode(Node str, int b)
{
Node temp = str;
while (temp != null)
{
if (temp.n == b)
{
System.out.println(b + " is found");
return;
}
temp = temp.link;
}
System.out.println(b + " is not found");
}(Verified by running the code: correctly finds a value at the last node, at a middle node, and correctly reports 'not found' when the value is absent.)Answer the following questions from the binary tree.
Answer (a)
Official answer keyAnswer (b)
Official answer keyAnswer (c)
Official answer keyThe ISC Computer Science 2025 Specimen Paper is a specimen paper for Class 12: 27 questions in printed order, 70 marks in all, asked from 10 chapters. A specimen paper is the sample question paper CISCE publishes before the exam to show the layout and style of that year’s paper. It is a good guide to the pattern you will meet.
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 | 9 | 28 |
| Recursion | 3 | 14 |
| Arrays, Strings | 3 | 13 |
| Data structures | 4 | 12 |
| Objects | 1 | 10 |
| Computer Hardware | 3 | 8 |
| Inheritance, Interfaces and Polymorphism | 1 | 5 |
| Implementation of algorithms to solve problems | 1 | 3 |
| Complexity and Big O notation | 1 | 1 |
| Variables, Expressions | 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 (9), Data structures (4), Recursion (3) and Arrays, Strings (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.