Choose the correct option.
- (a)$(A' + B) \cdot (A' + 1) = A' + B$
- (b)$(A \cdot B') + (A \cdot 0) = A \cdot B'$
- (c)$(A' \cdot B) + (A' \cdot 1) = A' \cdot B$
- (d)$(A' \cdot B) + (A' \cdot 0) = A' \cdot B$
Show answer
Answer
Correct option: (b)
The ISC Computer Science 2024 Question Paper for Class 12: all 29 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)
Choose the correct option.
Answer
Correct option: (c)
Choose the correct option.
Answer
Correct option: (a)
Study the Assertion and Reason and choose the correct option.
Assertion: For proposition $\sim A \Rightarrow B$, its contrapositive is $B \Rightarrow \sim A$
Reason: Contrapositive is the converse of inverse for any proposition.
Answer
Correct option: (d)
Choose the correct option.
Answer
Correct option: (b)
Study the Assertion and Reason and choose the correct option.
Assertion: Recursive data structure follows the LIFO principle.
Reason: Execution of recursive code follows the concepts of data structure Queue.
Answer
Correct option: (c)
Answer the following.
Answer
Answer the following.
Answer
Answer the following.
Answer
Answer the following.
Answer
static keyword, and each object of the class gets its own separate copy of it. A class variable is declared with the static keyword, and only one copy of it exists, shared by all objects of the class.Answer the following.
Answer
Answer the following.
Answer
Final answer: 2840
Answer the questions on the code given below.
int jolly(int[ ] x, int n, int m)
{
if (n < 0)
return m;
else if(n<x.length)
m = (x[n] > m)? x[n] : m;
return jolly(x, --n, m);
}Answer (a)
Answer (b)
Fill in the blanks marked ?1?, ?2? ... so that the code works.
int small_dig(int n)
{ int min = ?1? ;
while (n != 0)
{
int q=n/10;
int r = ?2? * 10;
min = r > min ? ?3? : r;
n=q;
}
return min;
}Answer (a)
Blanks: 9
Answer (b)
Blanks: n - q
Answer (c)
Blanks: min
Answer the following using a truth table.
| INPUTS | |
|---|---|
| P | Candidate is a Postgraduate |
| S | Candidate is an employee of the same College |
| E | Candidate has a teaching experience of more than 15 years |
| B | Candidate possesses a B.Ed. degree |
Answer
| P | S | E | B | 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 | 1 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 0 | 0 | 0 |
| 1 | 1 | 0 | 1 | 1 |
| 1 | 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
Reduce the following using a Karnaugh map.
Answer
Groups: (10, 11, 14, 15) → PE; (9, 11, 13, 15) → PB; (6, 7, 14, 15) → SE
Reduced expression: X = PE + PB + SE

Reduce the following using a Karnaugh map.
Answer
Groups: (8, 9, 10, 11) → (A' + B); (0, 2, 4, 6) → (A + D); (2, 6, 10, 14) → (C' + D)
Reduced expression: F = (A' + B)(A + D)(C' + D)

Answer the following using a truth table.
Answer
| A | B | C | A => B | B => C | (A => B).(B => C) | A => C | (A => B).(B => C) => (A => C) |
| 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 |
| 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 |
| 0 | 1 | 0 | 1 | 0 | 0 | 1 | 1 |
| 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 | 0 | 0 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
Answer the following.
Answer
Answer the following.
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

Answer the following.
Answer
Write the program described below.
| Class name | : | DeciHex |
|---|---|---|
| Data members/instance variables: | ||
| num | : | stores the positive integer |
| hexa | : | string to store the hexadecimal equivalent of num |
| Methods / Member functions: | ||
| DeciHex( ) | : | constructor to initialise the data members with legal initial values |
| void getNum( ) | : | to accept a positive integer |
| void convert(int n) | : | to find the hexadecimal equivalent of the formal parameter ‘n’ using the recursive technique |
| void display( ) | : | to display the decimal number and its hexadecimal equivalent by invoking the function convert( ) |
Answer
import java.util.Scanner;
class DeciHex
{
int num;
String hexa;
DeciHex()
{
num = 0;
hexa = "";
}
void getNum()
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter a positive integer: ");
num = sc.nextInt();
}
void convert(int n)
{
if (n == 0)
return;
int digit = n % 16;
char ch;
if (digit < 10)
ch = (char) ('0' + digit);
else
ch = (char) ('A' + digit - 10);
convert(n / 16);
hexa = hexa + ch;
}
void display()
{
convert(num);
if (hexa.equals(""))
hexa = "0";
System.out.println("Decimal number = " + num);
System.out.println("Hexadecimal equivalent = " + hexa);
}
public static void main(String[] args)
{
DeciHex obj = new DeciHex();
obj.getNum();
obj.display();
}
}Explanation: The constructor initialises num=0 and hexa="". getNum() reads a positive integer. convert(n) is recursive: it finds the current least-significant hex digit (n%16), recurses on n/16 first (so more significant digits are processed and appended before less significant ones), then appends the current digit's hex character to hexa - this ensures the digits appear in the correct (most-significant-first) order. display() invokes convert(num) and then prints the decimal number and its hexadecimal equivalent. Tested: input 25 gives hexadecimal 19, and input 28 gives hexadecimal 1C, matching both given examples exactly.Write the program described below.
| Class name | : | InsSort |
|---|---|---|
| Data members/instance variables: | ||
| arr[ ] | : | stores the array elements |
| size | : | stores the number of elements in the array |
| Methods / Member functions: | ||
| InsSort(int s) | : | constructor to initialise size = s |
| void getArray( ) | : | accepts the array elements |
| void insertionSort( ) | : | sorts the elements of the array in descending order using the Insertion Sort technique |
| double find( ) | : | calculates and returns the average of all the odd numbers in the array |
| void display() | : | displays the elements of the array in a sorted order along with the average of all the odd numbers in the array by invoking the function find( ) with an appropriate message |
Answer
import java.util.Scanner;
class InsSort
{
int arr[];
int size;
InsSort(int s)
{
size = s;
arr = new int[size];
}
void getArray()
{
Scanner sc = new Scanner(System.in);
for (int i = 0; i < size; i++)
{
System.out.print("Enter element " + (i + 1) + ": ");
arr[i] = sc.nextInt();
}
}
void insertionSort()
{
for (int i = 1; i < size; i++)
{
int key = arr[i];
int j = i - 1;
while (j >= 0 && arr[j] < key)
{
arr[j + 1] = arr[j];
j--;
}
arr[j + 1] = key;
}
}
double find()
{
int sum = 0, count = 0;
for (int i = 0; i < size; i++)
{
if (arr[i] % 2 != 0)
{
sum += arr[i];
count++;
}
}
if (count == 0)
return 0;
return (double) sum / count;
}
void display()
{
System.out.print("Sorted array (descending order): ");
for (int i = 0; i < size; i++)
System.out.print(arr[i] + " ");
System.out.println();
System.out.println("Average of odd numbers = " + find());
}
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter size of array: ");
int s = sc.nextInt();
InsSort obj = new InsSort(s);
obj.getArray();
obj.insertionSort();
obj.display();
}
}Explanation: The constructor allocates arr[] of the given size. getArray() reads the elements. insertionSort() implements the standard Insertion Sort but shifts elements while the key is greater than the compared element, so the array ends up sorted in descending order. find() sums all odd-valued elements and returns their average (0 if there are none). display() prints the sorted array and calls find() to print the average of odd numbers. Tested with input {12,5,9,20,3,8}: sorted output is 20 12 9 8 5 3, and the average of the odd numbers (5,9,3) is correctly computed as 5.666666666666667.Write the program described below.
| Class name | : | Coding |
|---|---|---|
| Data members/instance variables: | ||
| wrd | : | stores the word |
| len | : | stores the length of the word |
| Methods / Member functions: | ||
| Coding() | : | constructor to initialise the data members with legal initial values |
| void accept( ) | : | to accept a word |
| void find() | : | to display all the characters of ‘wrd’ along with their ASCII codes. Also display the lowest ASCII code and the highest ASCII code, in ‘wrd’ |
| void show( ) | : | to display the original word and all the characters of ‘wrd’ along with their ASCII codes. Also display the lowest ASCII code and the highest ASCII code in ‘wrd’, by invoking the function find( ) |
Answer
import java.util.Scanner;
class Coding
{
String wrd;
int len;
Coding()
{
wrd = "";
len = 0;
}
void accept()
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter a word (alphabets only): ");
wrd = sc.next();
len = wrd.length();
}
void find()
{
int lowest = wrd.charAt(0);
int highest = wrd.charAt(0);
for (int i = 0; i < len; i++)
{
char ch = wrd.charAt(i);
int code = (int) ch;
System.out.println(ch + " = " + code);
if (code < lowest)
lowest = code;
if (code > highest)
highest = code;
}
System.out.println("Lowest ASCII code: " + lowest);
System.out.println("Highest ASCII code: " + highest);
}
void show()
{
System.out.println("Original word: " + wrd);
find();
}
public static void main(String[] args)
{
Coding obj = new Coding();
obj.accept();
obj.show();
}
}Explanation: accept() reads the word and stores its length in len. find() loops through each character of wrd, prints the character with its ASCII code, and tracks the lowest and highest ASCII codes seen; these are printed at the end. show() prints the original word and then calls find(). Tested with input "Java": output is exactly as specified - J=74, a=97, v=118, a=97, Lowest ASCII code: 74, Highest ASCII code: 118.Answer the questions on the class described below.
| Class name | : | CardGame |
|---|---|---|
| Data members/ instance variables: | ||
| cards[ ] | : | array to store integers as cards |
| cap | : | to store the maximum capacity of array |
| top | : | to store the index of the topmost element of the array |
| Methods / Member functions: | ||
| CardGame(int cc) | : | constructor to initialise cap=cc and top=-1 |
| void addCard(int v) | : | to add the card at the top index if possible, otherwise display the message “CARD PILE IS FULL” |
| int drawCard() | : | to remove and return the card from the top index of the card pile, if any, else return the value -9999 |
| void display( ) | : | to display all the cards of card pile |
Answer (i)
void addCard(int v)
{
if (top == cap - 1)
System.out.println("CARD PILE IS FULL");
else
{
top++;
cards[top] = v;
}
}
int drawCard()
{
if (top == -1)
return -9999;
int val = cards[top];
top--;
return val;
}Explanation: addCard() checks if the pile is full (top == cap-1); if not, it increments top and stores v at that index. drawCard() checks if the pile is empty (top == -1), returning -9999 in that case; otherwise it returns the value at the top index and decrements top. Tested with cap=3: after addCard(10), addCard(20), addCard(30), a further addCard(40) correctly prints 'CARD PILE IS FULL'; successive drawCard() calls correctly return 30, 20, 10 and then -9999 once empty.Answer (ii)
Write the program described below.
| Class name | : | EmpSal |
|---|---|---|
| Data members/instance variables: | ||
| empnum | : | to store the name of the employee |
| empcode | : | integer to store the employee code |
| salary | : | to store the salary of the employee in decimal |
| Methods / Member functions: | ||
| EmpSal(...) | : | parameterised constructor to assign values to data members |
| void show( ) | : | to display the details of the employee |
| Class name | : | Overtime |
|---|---|---|
| Data members/instance variables: | ||
| hours | : | integer to store overtime in hours |
| totsal | : | to store the total salary in decimal |
| Methods / Member functions: | ||
| Overtime(...) | : | parameterised constructor to assign values to data members of both the classes |
| void calSal() | : | calculates the total salary by adding the overtime amount to salary as per the criteria given above |
| void show() | : | to display the employee details along with the total salary (salary + overtime amount) |
Answer
class Overtime extends EmpSal
{
int hours;
double totsal;
Overtime(String n, int c, double s, int h)
{
super(n, c, s);
hours = h;
totsal = 0.0;
}
void calSal()
{
if (hours > 40)
totsal = salary + 5000;
else if (hours >= 30 && hours <= 40)
totsal = salary + 3000;
else
totsal = salary;
}
void show()
{
super.show();
calSal();
System.out.println("Overtime Hours: " + hours);
System.out.println("Total Salary: " + totsal);
}
}Explanation: Overtime extends EmpSal. Its constructor calls super(n, c, s) to initialise the inherited empnum, empcode and salary, then initialises hours and totsal. calSal() applies the three overtime criteria (hours>40 adds 5000, 30<=hours<=40 adds 3000, hours<30 leaves salary unchanged) to compute totsal. show() calls super.show() to display the inherited employee details, invokes calSal(), then prints the overtime hours and total salary. Tested with salary=40000: hours=45 gives Total Salary=45000.0, hours=35 gives 43000.0, and hours=20 gives 40000.0 (unchanged) - all matching the given criteria.Answer the following.
Answer
Answer the following questions from the binary tree.
Answer (a)
Answer (b)
Answer (c)
The ISC Computer Science 2024 Question Paper is a board paper for Class 12: 29 questions in printed order, 70 marks in all, asked from 10 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 | 4 | 35 |
| Case based | 3 | 11 |
| K-map | 2 | 10 |
| Short answer | 5 | 8 |
| Truth table | 2 | 8 |
| Long answer | 1 | 5 |
| MCQ | 4 | 4 |
| Drawing | 1 | 3 |
| Binary tree | 1 | 3 |
| Assertion-reason | 2 | 2 |
| One word | 2 | 2 |
| Conversion | 1 | 2 |
| Numerical | 1 | 2 |
| Chapter | Questions | Marks printed* |
|---|---|---|
| Boolean Algebra | 12 | 28 |
| Arrays, Strings | 3 | 22 |
| Data structures | 4 | 11 |
| Objects | 1 | 10 |
| Computer Hardware | 3 | 9 |
| Inheritance, Interfaces and Polymorphism | 2 | 6 |
| Implementation of algorithms to solve problems | 1 | 3 |
| Recursion | 1 | 3 |
| Complexity and Big O notation | 1 | 2 |
| Methods | 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.
29 questions, 70 marks in all, shown in full and in printed order on this page.
By number of questions: Boolean Algebra (12), Data structures (4), Arrays, Strings (3) and Computer Hardware (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.