Choose the correct option.
- (a)Involution Law
- (b)Absorption Law
- (c)Commutative Law
- (d)Complement Law
Show answer
Answer
Correct option: (d)
The ISC Computer Science 2026 Improvement Paper for Class 12: all 33 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: (d)
Choose the correct option.
Answer
Correct option: (c)
Study the Assertion and Reason and choose the correct option.
Assertion: Its inverse in statement form is If you do not submit your assignment on time, then you will not get full marks for submission.
Reason: A conditional statement $P \Rightarrow Q$ can be expressed as $\sim P \vee Q$
Answer
Correct option: (b)
Choose the correct option.
Answer
Correct option: (b)
Choose the correct option.
for (int i = 0; i < p; i++)
{
a += Math.sqrt(i);
}
for (int j = 0; j < q; j++)
{
b += Math.log(j + 1);
}Answer
Correct option: (d)
Study the Assertion and Reason and choose the correct option.
Assertion: In Java, a subclass can override a method of its superclass by defining a method with the same name and same signature.
Reason: If the subclass calls the overridden method without using the super keyword, the subclass’s own version of the method will get called, leading to recursion.
Answer
Correct option: (b)
Choose the correct option.
class Student
{
static int totalStu = 0;
String name;
public Student(String n)
{
name = n;
totalStu++;
}
}Identify the valid statement(s)?
I. The variable totalStu keeps count of all Student objects created
II. Each object of the class gets its own copy of totalStu
III. The variable totalStu can be accessed using Student.totalStuAnswer
Correct option: (b)
Study the Assertion and Reason and choose the correct option.
Assertion: In Java, an abstract class is created for the purpose of inheritance.
Reason: An abstract class can be instantiated.
Answer
Correct option: (c)
Answer the following.
Answer
Answer the following.
Answer
Answer the following.
Answer
Answer the following.
Answer
Final answer: 5020
Answer the questions on the code given below.
public int justDoIt(int num)
{
if (num == 0)
return 0;
int c = justDoIt(num / 2);
int bit = num % 2;
System.out.print(bit);
return c + (bit == 1 ? 1 : 0);
}Answer (a)
Answer (b)
Fill in the blanks marked ?1?, ?2? ... so that the code works.
boolean isNiven(int n)
{
int sum = 0, temp = ?1?;
while (temp > 0)
{
sum += ?2?;
temp /= 10;
}
return (?3?);
}Answer
Blanks: $n$; $temp \% 10$; $(sum \ne 0\ \&\&\ n \% sum == 0)$
Answer the following.
Answer
Answer the following.
Draw: Logic gate diagram for an 8 : 1 multiplexer
Must show: 8 data inputs, 3 select lines, output
Answer

Answer the following.
Answer
Answer the following.
Answer
Answer the following.
Answer
Answer the following using a truth table.
| INPUTS | |
|---|---|
| V | Vehicle detected |
| S | Parking slot available |
| P | Payment confirmed |
| I | VIP access granted |
Answer
| V | S | P | I | VS + S(P + I) + P'I |
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 0 | 1 | 1 |
| 0 | 0 | 1 | 0 | 0 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 1 |
| 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 | 0 |
| 1 | 1 | 0 | 0 | 1 |
| 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
Draw the following.
Draw: Logic gate diagram for a Full Adder
Must show: SUM, CARRY
Answer

Answer the following using a truth table.
Answer
| A | B | A ⊕ B | A ⊙ B | (A ⊙ B)' | (A ⊕ B) = (A ⊙ B)' |
| 0 | 0 | 0 | 1 | 0 | 1 |
| 0 | 1 | 1 | 0 | 1 | 1 |
| 1 | 0 | 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 | 0 | 1 |
Reduce the following using a Karnaugh map.
Answer
Groups: (0, 1, 8, 9) → B'C'; (0, 2, 8, 10) → B'D'; (0, 4, 8, 12) → C'D'
Reduced expression: F = B'C' + B'D' + C'D'

Answer the following from the logic gate diagram.

Answer
Draw the following.
Draw: Logic gate diagram of a 2-input OR gate using NAND gates only, with the expression at each step
Must show: NAND gates only, expression at each step
Answer

Write the program described below.
| Class name | : | Powerful |
|---|---|---|
| Data member/instance variable: | ||
| num | : | to store a positive integer |
| Methods/Member functions: | ||
| Powerful( ) | : | constructor to initialise the data member with legal initial value |
| void input( ) | : | to accept a positive integer |
| int sum(int num) | : | to return the sum of the $\text{digit}^{\text{digit}}$ for all digits of num using recursive technique |
| void check( ) | : | to check whether the given number is a powerful number by invoking the function sum( ) and display the result with an appropriate message |
Answer
import java.util.Scanner;
class Powerful
{
long num;
Powerful()
{
num = 0;
}
void input()
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter a positive integer: ");
num = sc.nextLong();
}
int sum(int num)
{
if (num == 0)
return 0;
int digit = num % 10;
return (int) Math.pow(digit, digit) + sum(num / 10);
}
void check()
{
int s = sum((int) num);
if (s == num)
System.out.println(num + " is a Powerful number.");
else
System.out.println(num + " is not a Powerful number.");
}
public static void main(String[] args)
{
Powerful obj = new Powerful();
obj.input();
obj.check();
}
}Explanation: input() reads the number. sum(num) recursively adds digit^digit for the last digit of num and the sum for the remaining digits (num/10), stopping when num becomes 0. check() compares this digit-power sum to the original number and prints the appropriate message. Tested (run for real): for num = 3435, sum(3435) = 3^3+4^4+3^3+5^5 = 3435, and the program correctly printed "3435 is a Powerful number."Answer the following.
Answer
Write the program described below.
| Class name | : | FibList |
|---|---|---|
| Data members/instance variables: | ||
| list[ ] | : | array to hold positive integers |
| size | : | to store the size of array |
| Methods/Member functions: | ||
| FibList(int s) | : | constructor to assign size = s |
| void read( ) | : | to accept the elements of the array |
| boolean checkFib(int n) | : | to check and return true if n is a Fibonacci term otherwise return false. |
| FibList genFib(FibList fbl) | : | to return a new object containing only Fibonacci terms from the object fbl by invoking the method checkFib( ) as per the given instructions |
| void display( ) | : | to display the elements of the original array and the array holding the Fibonacci terms |
Answer
import java.util.Scanner;
class FibList
{
int list[];
int size;
FibList(int s)
{
size = s;
list = new int[size];
}
void read()
{
Scanner sc = new Scanner(System.in);
System.out.println("Enter " + size + " positive integers:");
for (int i = 0; i < size; i++)
list[i] = sc.nextInt();
}
boolean checkFib(int n)
{
int a = 0, b = 1;
if (n == 0)
return true;
while (b < n)
{
int c = a + b;
a = b;
b = c;
}
return (b == n);
}
FibList genFib(FibList fbl)
{
int count = 0;
for (int i = 0; i < fbl.size; i++)
if (fbl.checkFib(fbl.list[i]))
count++;
FibList temp = new FibList(count);
int j = 0;
for (int i = 0; i < fbl.size; i++)
{
if (fbl.checkFib(fbl.list[i]))
{
temp.list[j] = fbl.list[i];
j++;
}
}
return temp;
}
void display()
{
for (int i = 0; i < size; i++)
System.out.print(list[i] + " ");
System.out.println();
}
public static void main(String[] args)
{
FibList fbl = new FibList(7);
fbl.read();
FibList res = fbl.genFib(fbl);
System.out.print("Original array: ");
fbl.display();
System.out.print("Fibonacci terms: ");
res.display();
}
}Explanation: checkFib(n) tests whether n is a Fibonacci number by generating the series until the term is >= n and comparing. genFib(fbl) first counts how many elements of fbl.list are Fibonacci terms, creates a new FibList object of exactly that size, then copies only the Fibonacci terms into it and returns it. Tested (run for real) with input {1,4,9,3,10,13,7}: output was 'Original array: 1 4 9 3 10 13 7' and 'Fibonacci terms: 1 3 13', matching the example in the question.Write the program described below.
| Class name | : | Extract |
|---|---|---|
| Data member/instance variable: | ||
| text | : | to store the sentence |
| Methods/Member functions: | ||
| Extract( ) | : | constructor to initialise the data member with legal initial value |
| void readSent( ) | : | to accept a sentence |
| String extractText(String wrd) | : | to extract and return the substring between the first and the last occurrence of wrd from text |
| void display( ) | : | to display the original sentence and the substring by invoking extractText( ) |
Answer
import java.util.Scanner;
class Extract
{
String text;
Extract()
{
text = "";
}
void readSent()
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter a sentence: ");
text = sc.nextLine();
}
String extractText(String wrd)
{
int first = text.indexOf(wrd);
int last = text.lastIndexOf(wrd);
if (first == -1 || first == last)
return "No such substring found";
int start = first + wrd.length();
return text.substring(start, last).trim();
}
void display()
{
System.out.println("Original sentence: " + text);
System.out.println("Substring: " + extractText("not"));
}
public static void main(String[] args)
{
Extract obj = new Extract();
obj.readSent();
obj.display();
}
}Explanation: extractText(wrd) finds the first and last occurrence of wrd in text using indexOf() and lastIndexOf(). If wrd occurs only once or not at all (first==-1 or first==last), it returns the 'No such substring found' message; otherwise it returns the trimmed substring strictly between the end of the first occurrence and the start of the last occurrence. Tested (run for real) with the sentence 'It is not true that I do not like coffee' and word 'not': output was 'Substring: true that I do', matching the example in the question.Answer the questions on the class described below.
| Class name | : | CustomerService |
|---|---|---|
| Data members/instance variables: | ||
| services[ ] | : | array to store customer service request |
| size | : | to store the maximum capacity of the array |
| first | : | to store the index of the first customer service request |
| last | : | to store the index of the last customer service request |
| Methods/Member functions: | ||
| CustomerService(int s) | : | constructor to assign size = s, first = 0 and last = 0 |
| void add(int reqst) | : | to insert a request at index last, if space is available, otherwise display “Request cannot be accepted at the moment” |
| int del( ) | : | to remove and return the request at index first, if any, else return -9999 |
Answer (i)
void add(int reqst)
{
if (last == size)
System.out.println("Request cannot be accepted at the moment");
else
{
services[last] = reqst;
last++;
}
}
int del()
{
if (first == last)
return -9999;
else
{
int val = services[first];
first++;
return val;
}
}(Tested (run for real) inside a complete class with size=3: adding a 4th request correctly printed "Request cannot be accepted at the moment", and the four del() calls correctly returned 101, 102, 103, then -9999.)Answer (ii)
Write the program described below.
| Class name | : | Course |
|---|---|---|
| Data members/instance variables: | ||
| title | : | to store the course title |
| duration | : | to store the course duration in months |
| Methods/Member functions: | ||
| Course(...) | : | parameterised constructor to assign values to its data members |
| void show( ) | : | to display the course details |
| Class name | : | Internship |
|---|---|---|
| Data members/instance variables: | ||
| company | : | to store company name |
| stipend | : | to store the monthly allowance |
| totalEarnings | : | to store the total earnings |
| Methods/Member functions: | ||
| Internship(...) | : | parameterised constructor to assign values to data members of both the classes |
| void calculate( ) | : | to calculate the total earnings as: (stipend $\times$ duration) |
| void show( ) | : | to display course and internship details |
Answer
class Internship extends Course
{
String company;
double stipend;
double totalEarnings;
Internship(String t, int d, String c, double s)
{
super(t, d);
company = c;
stipend = s;
totalEarnings = 0.0;
}
void calculate()
{
totalEarnings = stipend * duration;
}
void show()
{
super.show();
System.out.println("Company: " + company);
System.out.println("Stipend: " + stipend);
calculate();
System.out.println("Total Earnings: " + totalEarnings);
}
}Explanation: Internship extends Course. Its constructor calls super(t, d) to initialise the inherited title and duration, then initialises its own data members. calculate() computes totalEarnings as stipend × duration (duration is inherited from Course). show() calls super.show() to display the course details, then displays the internship details and total earnings. Tested (run for real, with a stub Course class and main): for duration=6 and stipend=5000.0, calculate() correctly gave Total Earnings = 30000.0.Write the program described below.
class Node
{
char ch;
Node next;
}
Write an Algorithm OR a Method to count and display the number of upper-case and lower-case characters.
The method declaration is as follows:
void countCase(Node startptr)Answer
void countCase(Node startptr)
{
int upper = 0, lower = 0;
Node p = startptr;
while (p != null)
{
if (Character.isUpperCase(p.ch))
upper++;
else if (Character.isLowerCase(p.ch))
lower++;
p = p.next;
}
System.out.println("Upper-case count: " + upper);
System.out.println("Lower-case count: " + lower);
}Explanation: A pointer p starts at startptr and traverses the linked list node by node until it reaches null (end of list). At each node, Character.isUpperCase()/isLowerCase() checks the character ch and increments the appropriate counter; the counts are displayed once the traversal is complete. Tested (run for real) on the list H-e-L-l-O: output was 'Upper-case count: 3' and 'Lower-case count: 2', which is correct (H, L, O are upper-case; e, l are lower-case).Answer the following questions from the binary tree.

Answer (a)
Answer (b)
Answer (c)
The ISC Computer Science 2026 Improvement Paper is a improvement paper for Class 12: 33 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 | 35 |
| Case based | 4 | 14 |
| Short answer | 6 | 12 |
| Drawing | 3 | 8 |
| Truth table | 2 | 7 |
| MCQ | 5 | 5 |
| K-map | 1 | 5 |
| Assertion-reason | 3 | 3 |
| One word | 2 | 2 |
| Conversion | 1 | 2 |
| Numerical | 1 | 2 |
| Chapter | Questions | Marks printed* |
|---|---|---|
| Objects | 4 | 29 |
| Boolean Algebra | 11 | 23 |
| Computer Hardware | 6 | 13 |
| Data structures | 4 | 12 |
| Inheritance, Interfaces and Polymorphism | 3 | 7 |
| Recursion | 2 | 5 |
| Implementation of algorithms to solve problems | 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.
33 questions, 70 marks in all, shown in full and in printed order on this page.
By number of questions: Boolean Algebra (11), Computer Hardware (6), Objects (4) and Data structures (4).
Tap “Show answer” under a question to see its answer. The download button saves the paper as a PDF, with or without the answers.