Download ISC Class 12 Computer Science Sample Papers
Explore authentic exam practice materials through the ISC Class 12 Computer Science Sample Paper 2024 with Solutions. Tailored for Class 12 learners, utilizing these Computer Science sample papers ensures thorough preparation and strengthens time management skills before final ISC evaluations.
Access ISC Sample Papers and Solutions
Access the complete sample paper PDF for Class 12 Computer Science below. Regular practice with these targeted mock exams builds familiarity with expected question patterns and chapter weightage to help secure higher marks.
PART I - 20 MARKS
Question 1
(i) Absorption law states that: [1]
(a) A • ( A' + B) = A
(b) A + ( A • B) = A
(c) Both (a) and (b)
(d) A • ( B + C ) = A • B + A • C
Answer: (c) Both (a) and (b)
Both equations represent forms of the absorption law in Boolean algebra.
Teacher's Note:
a) The absorption law absorbs terms to simplify Boolean expressions.
b) Students must memorize both forms: A • (A' + B) = A • B and A + (A • B) = A.
(ii) Assertion : A=0 B=1 C=0 and D=1 and minterm is A'•B•C'•D
Reason : The final sum term must be 0 so A and C are complemented. [1]
(a) Both Assertion and Reason are true, and Reason is the correct explanation for Assertion.
(b) Both Assertion and Reason are true, but Reason is not the correct explanation for Assertion.
(c) Assertion is true and Reason is false.
(d) Assertion is false and Reason is true.
Answer: (c) Assertion is true and Reason is false.
For a minterm, a variable with value 0 is represented in its complemented form (A', C') because minterms produce a product of literals that evaluates to 1 when the inputs match, so the literal itself must evaluate to 1 (not 0).
Teacher's Note:
a) In minterms, 0 is represented as a complemented literal and 1 as an uncomplemented literal.
b) Ensure students do not confuse minterm rules with maxterm rules where 0 gives an uncomplemented sum term.
(iii) According to the Principle of duality, the Boolean equation (P + Q') • R • 1 = P • R + Q' • R will be equivalent to: [1]
(a) P • Q' + R + 1 = (P + R) • (Q' + R)
(b) P • Q' + R + 0 = (P + R) • (Q' + R)
(c) P' • Q + R + 1 = (P' • R') • (Q + R')
(d) P • Q' + R • 0 = (P + R) • (Q' + R)
Answer: (b) P • Q' + R + 0 = (P + R) • (Q' + R)
Applying the duality principle means replacing AND (•) with OR (+), OR (+) with AND (•), 1 with 0, and 0 with 1, while keeping variables unchanged.
Teacher'sNote:
a) Principle of duality swaps • with + and 1 with 0.
b) Variables like P, Q, and R remain unchanged during dual transformation.
(iv) The complement of the Boolean expression (X • Y)' + Z' is: [1]
(a) (X + Y) • Z
(b) X • Y • Z
(c) (X' + Y') • Z'
(d) (X' + Y') • Z
Answer: (b) X • Y • Z
((X • Y)' + Z')' = (X • Y)'' • (Z')' = (X • Y) • Z = X • Y • Z.
Teacher's Note:
a) Use De Morgan's Law ((A + B)' = A' • B') and the involution law ((A')' = A).
b) Pay close attention to parentheses when applying negation.
(v) The equivalent of P ∧ Q ∨ ~ P ∧ ~ Q will be: [1]
(a) ( ( P ∧ Q ) ∨ ~ P ) ∧ ~ Q
(b) ( P ∧ Q ) ∨ ( ~ P ∧ ~ Q )
(c) P ∧ ( Q ∨ ~ P ) ∧ ~ Q
(d) P ∧ ( Q ∨ (~ P ∧ ~ Q ) )
Answer: (b) ( P ∧ Q ) ∨ ( ~ P ∧ ~ Q )
Standard operator precedence evaluates conjunction (∧) before disjunction (∨).
Teacher's Note:
a) Conjunction has higher precedence than disjunction in propositional logic.
b) Explicit grouping clarifies that both AND terms are evaluated first before being ORed together.
(vi) Assertion : Boolean algebra and Binary number system are different from each other.
Reason : There are some basic operations like AND, OR and NOT which are performed only in Boolean algebra. [1]
(a) Both Assertion and Reason are true, and Reason is the correct explanation for Assertion.
(b) Both Assertion and Reason are true, but Reason is not the correct explanation for Assertion.
(c) Assertion is true and Reason is false.
(d) Assertion is false and Reason is true.
Answer: (a) Both Assertion and Reason are true, and Reason is the correct explanation for Assertion.
Boolean algebra deals with logic operations and variables, whereas binary number systems deal with numeric quantities represented using base 2 digits.
Teacher's Note:
a) Boolean algebra is an algebraic structure for logic, while binary numbers are positional numeral systems.
b) Logical operations like AND, OR, NOT form the foundation of Boolean algebra.
(vii) What is the relevance of the keyword static for a data member of a class [1]
Answer:
A static data member is shared among all objects of the class, meaning only a single copy of that variable is created in memory regardless of how many objects are instantiated.
Teacher's Note:
a) Static variables belong to the class rather than any specific instance.
b) They are initialized to zero by default and can be accessed without creating an object.
(viii) State any one purpose of using interfaces in Java programming. [1]
Answer:
Interfaces are used to achieve multiple inheritance in Java.
Teacher's Note:
a) An interface defines a contract that implementing classes must follow.
b) It also supports full abstraction and loose coupling.
(ix) Define Canonical form of an expression with respect to its Cardinal form. [1]
Answer:
The canonical form represents a Boolean expression as a sum of minterms (SOP) or product of maxterms (POS) where every variable appears in each term, while the cardinal form is its shorthand numerical representation using minterm/maxterm indices (like Sigma or Pi notation).
Teacher's Note:
a) Canonical form explicitly lists all variables in every term.
b) Cardinal form simplifies this representation using decimal minterm/maxterm numbers.
(x) State any one application each of half adder and full adder. [1]
Answer:
Half adder is used for adding two single-bit binary numbers, while a full adder is used in multi-bit arithmetic units to add three bits including a carry from a previous addition.
Teacher's Note:
a) Half adders cannot handle a carry-in input.
b) Full adders can be cascaded to build parallel binary adders for larger bit widths.
Question 2
(i) Convert the following infix notation to postfix form.
( A / B + C ) / ( D * ( E − F ) [2]
Answer:
AB/C+DEFE*-/
Teacher's Note:
a) Convert sub-expressions inside parentheses first using operator precedence.
b) Double-check stack operations for parentheses and operators during conversion.
(ii) An array ARR[ −4 ……6, −2……12] , stores elements in Row Major Wise, with the address ARR[2][3] as 4142. If each element requires 2 bytes of storage, find the Base address. [2]
Answer:
Base Address = 4056
Working:
Lower Bound Row (LBR) = -4, Upper Bound Row (UBR) = 6
Lower Bound Col (LBC) = -2, Upper Bound Col (UBC) = 12
Number of columns (C) = UBC - LBC + 1 = 12 - (-2) + 1 = 15
Address(ARR[I][J]) = Base + W * ((I - LBR) * C + (J - LBC))
4142 = Base + 2 * ((2 - (-4)) * 15 + (3 - (-2)))
4142 = Base + 2 * (6 * 15 + 5)
4142 = Base + 2 * (90 + 5)
4142 = Base + 2 * 95
4142 = Base + 190
Base = 4142 - 190 = 4056.
Teacher's Note:
a) Carefully calculate total columns as Upper Bound minus Lower Bound plus one.
b) Substitute row and column index offsets correctly into the Row Major formula.
(iii) The following functions are a part of some class:
void Try(char ch[],int x)
{ System.out.println(ch); char temp;
if ( x<ch.length/2)
{ temp=ch[x];
ch[x]= ch[ch.length-x-1];
ch[ch.length-x-1] = temp;
Try(ch,x+1);
} }
void Try1(String n)
{ char c[]=new char[n.length()];
for(int i=0;i<c.length;i++)
c[i] = n.charAt(i);
Try(c,0);
}
(a) What will the output of Try( ) when the value of ch[]={‘P’, ‘L’,‘A’, ‘Y’} and x=1? [2]
Answer:
PLAY
PYAL
Teacher's Note:
a) The method prints the array state before each recursive swap.
b) Trace index swaps carefully for elements at positions x and length - x - 1.
(b) What will the output of Try1( ) when the value of n=”SKY”? [1]
Answer:
SKY
YKS
Teacher's Note:
a) Try1 converts the string into a character array and calls Try with x = 0.
b) The array elements get reversed recursively and printed at each step.
(iv) The following function is a part of some class which computes and returns the value of a number ‘p’ raised to the power ‘q’ (pq). There are some places in the code marked by ?1? , ?2? , ?3? which must be replaced by an expression / a statement so that the function works correctly.
double power ( double p , int q )
{ double r = ?1? ;
int c = ( q<0 ) ? -q : q ;
if ( q == 0)
return 1 ;
else
{ for (int i = 1; i <= c ;?2?, i++);
return (q>0)? r : ?3?;
}
}
(a) What is the expression or statement at ?1? [1]
Answer:
1.0 (or 1)
Teacher's Note:
a) Initial value for multiplicative accumulation should be 1.
b) Using 1.0 maintains correct double type consistency.
(b) What is the expression or statement at ?2? [1]
Answer:
r = r * p (or r *= p)
Teacher's Note:
a) The loop multiplies r by p repeatedly up to c times.
b) Place the update statement properly inside the for loop header or body.
(c) What is the expression or statement at ?3? [1]
Answer:
1.0 / r (or 1/r)
Teacher's Note:
a) Negative exponents compute the reciprocal of the positive power result.
b) Ensure floating-point division is used.
PART II - 50 MARKS
SECTION - A
Question 3
(i) A Football Association coach analyses the criteria for a win/draw of his team depending on the following conditions.
• If the Centre and Forward players perform well but Defenders do not perform well.
OR
• If Goalkeeper and Defenders perform well but the Centre players do not perform well.
OR
• If all perform well.
The inputs are:
INPUTS
C Centre players perform well
D Defenders perform well
F Forward players perform well
G Goalkeeper perform well
(In all the above cases, 1 indicates yes and 0 indicates no.)
Output: X - Denotes the win/draw criteria [1 indicates win/draw and 0 indicates defeat in all cases]
Draw the truth table for the inputs and outputs given above and write the SOP expression for X(C, D, F, G). [5]
Answer:
Truth Table for X(C, D, F, G)
| C | D | F | G | 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 | 1 |
| 0 | 1 | 1 | 0 | 0 |
| 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 | 0 |
| 1 | 1 | 1 | 1 | 1 |
SOP Expression: X(C, D, F, G) = C' • D • F' • G + C' • D • F • G + C • D' • F • G' + C • D' • F • G + C • D • F • G
Teacher's Note:
a) Translate each condition accurately into minterms based on binary input combinations.
b) Verify all sixteen rows of the truth table against the problem statement.
(ii) Reduce the above expression X (C, D, F, G) by using 4-variable Karnaugh map, showing the various groups (i.e. octal, quads and pairs).
Draw the logic gate diagram for the reduced expression. Assume that the variables and their complements are available as inputs. [5]
Answer:
Reduced expression: X = C' • D • G + C • D' • F + C • F • G
[Figure: K-map grouping minterms 5, 7, 10, 11, 15 into quads/pairs, followed by a logic gate diagram with AND and OR gates using inputs C, D, F, G and their complements]
Teacher's Note:
a) Form valid quads and pairs on the K-map to get the minimal SOP expression.
b) Draw the logic diagram cleanly using standard AND/OR gate symbols.
Question 4
(i) (a) Reduce the Boolean function F(A,B,C,D) = π (0, 1, 2, 3, 4, 6, 9, 11, 13) by using 4-variable Karnaugh map, showing the various groups (i.e. octal, quads and pairs). [4]
Answer:
Reduced POS expression: F(A, B, C, D) = (A + B) • (C' + D') • (A' + C + D)
Teacher's Note:
a) Plot 0s for the given maxterm indices on the Karnaugh map.
b) Group adjacent 0s into maximal octals, quads, and pairs to derive the minimal product of sums.
(b) Draw the logic gate diagram for the reduced expression. Assume that the variables and their complements are available as inputs. [1]
Answer:
[Figure: Logic gate diagram consisting of OR gates feeding into a final AND gate for the POS expression]
Teacher's Note:
a) Product of sums requires OR gates at the first level and an AND gate at the output level.
b) Ensure all inputs and complements are correctly connected.
(ii) (a) From the logic circuit diagram given below, name the outputs (1), (2) and (3) and finally derive the Boolean expression (F) and simplify it. Identify the propositional connective which is equivalent to the simplified Boolean expression. [4]
[Figure: Logic circuit with inputs X, Y, Z. Gate 1 is NOR of X and Y'; Gate 2 is AND of X and Z'; Gate 3 is OR combining (1) and (2) to produce F(X, Y, Z)]
Answer:
Output (1) = (X + Y')' = X' • Y
Output (2) = X • Z'
Output (3) = F(X, Y, Z) = (X' • Y) + (X • Z')
Simplified Expression: F = X' • Y + X • Z'
Equivalent Propositional Connective: Conditional / Implication (if-then)
Teacher's Note:
a) Trace each gate output step-by-step from inputs to the final output.
b) Recognize standard Boolean equivalences for propositional logic connectives.
(b) If A=1 and B=0 then find the value of (A' + 1) • B [1]
Answer:
0
Working:
(1' + 1) • 0 = (0 + 1) • 0 = 1 • 0 = 0.
Teacher's Note:
a) Apply Boolean laws such as A + 1 = 1.
b) Multiplying any expression by 0 results in 0.
Question 5
(i) Draw the logic circuit to encode the following Hexadecimal number (1, 3, 5, 6, 9, A, C, E) to its binary equivalents. Also state the binary equivalents of the given numbers. [5]
Answer:
Binary equivalents:
1 = 0001
3 = 0011
5 = 0101
6 = 0110
9 = 1001
A = 1010
C = 1100
E = 1110
[Figure: Encoder logic circuit diagram showing encoder lines mapping hex inputs to 4-bit binary outputs]
Teacher's Note:
a) Convert each hexadecimal digit correctly into its 4-bit binary equivalent.
b) Draw encoder circuits using standard OR gate arrays.
(ii) Verify if the following proposition is valid using the truth table:
A => ( B ∧ C ) = ( A => B ) ∧ ( B => C ) [3]
Answer:
The proposition is invalid (not a tautology), as the truth table columns for LHS and RHS do not match identically for all rows.
Teacher's Note:
a) Construct a complete 8-row truth table for propositions A, B, and C.
b) Compare the resulting truth values of LHS and RHS to test for validity.
(iii) How is a 2 to 4 decoder related to 4:1 multiplexer? [2]
Answer:
A 2-to-4 decoder can be used as the selection mechanism (or to generate minterms) for implementing a 4:1 multiplexer by combining its outputs with the data inputs using AND-OR gates.
Teacher's Note:
a) Decoders generate all minterms for their select lines.
b) Multiplexers select one of several data inputs using select lines.
SECTION - B
Question 6
An Evil Number is a number which contains even number of 1’s in its binary equivalent.
Example: Binary equivalent of 10 = 1010 which contains even number on 1’s.
Thus, 10 is an Evil Number.
Design a class Evil to check if a given number is an Evil number or not. Some of the members of the class are given below:
Class name : Evil
Data members/instance variables:
num : to store a positive integer number
bin : to store the binary equivalent
Methods / Member functions:
Evil( ) : default constructor to initialize the data member with legal initial value
void acceptNum( ) : to accept a positive integer number
void rec_bin (int x) : to convert the decimal number into its binary equivalent using recursive technique
void check( ) : to check whether the given number is an Evil number by invoking the function rec_bin() and to display the result with an appropriate message
Specify the class Evil giving details of the constructor( ), void acceptNum( ), void rec_bin(int) and void check( ). Define a main( ) function to create an object and call all the functions accordingly to enable the task. [10]
Answer:
import java.util.Scanner;
class Evil {
int num;
String bin;
Evil() {
num = 0;
bin = "";
}
void acceptNum() {
Scanner sc = new Scanner(System.in);
System.out.println("Enter a positive integer:");
num = sc.nextInt();
}
void rec_bin(int x) {
if (x > 0) {
rec_bin(x / 2);
bin = bin + (x % 2);
}
}
void check() {
bin = "";
if (num == 0) {
bin = "0";
} else {
rec_bin(num);
}
int count = 0;
for (int i = 0; i < bin.length(); i++) {
if (bin.charAt(i) == '1') {
count++;
}
}
System.out.println("Binary equivalent: " + bin);
if (count % 2 == 0) {
System.out.println(num + " is an Evil Number.");
} else {
System.out.println(num + " is not an Evil Number.");
}
}
public static void main(String[] args) {
Evil obj = new Evil();
obj.acceptNum();
obj.check();
}
}
Teacher's Note:
a) Ensure recursion is correctly implemented for binary conversion.
b) Count the number of '1's in the resulting binary string to determine if it is even.
Question 7
A class Composite contains a two-dimensional array of order [m x n]. The maximum values possible for both ‘m’ and ‘n’ is 20. Design a class Composite to fill the array with the first (m x n) composite numbers in column wise.
[Composite numbers are those which have more than two factors.]
The details of the members of the class are given below:
Class name : Composite
Data members/instance variables:
arr[ ] [ ] : integer array to store the composite numbers column wise
m : integer to store the number of rows
n : integer to store the number of columns
Member functions/methods:
Composite(int mm, int nn ) : to initialize the size of the matrix, m=mm and n=nn
int isComposite( int p ) : to return 1 if the number is composite otherwise returns 0
void fill ( ) : to fill the elements of the array with the first (m × n) composite numbers in column wise
void display( ) : to display the array in a matrix form
Specify the class Composite giving details of the constructor(int,int), int isComposite(int), void fill( ) and void display( ). Define a main( ) function to create an object and call all the functions accordingly to enable the task. [10]
Answer:
import java.util.Scanner;
class Composite {
int arr[][] = new int[20][20];
int m, n;
Composite(int mm, int nn) {
m = mm;
n = nn;
}
int isComposite(int p) {
int factors = 0;
for (int i = 1; i <= p; i++) {
if (p % i == 0) {
factors++;
}
}
if (factors > 2)
return 1;
else
return 0;
}
void fill() {
int num = 4;
for (int j = 0; j < n; j++) {
for (int i = 0; i < m; i++) {
while (isComposite(num) == 0) {
num++;
}
arr[i][j] = num;
num++;
}
}
}
void display() {
System.out.println("The Matrix is:");
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {
System.out.print(arr[i][j] + "\t");
}
System.out.println();
}
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter rows and columns (max 20):");
int r = sc.nextInt();
int c = sc.nextInt();
if (r <= 20 && c <= 20) {
Composite obj = new Composite(r, c);
obj.fill();
obj.display();
} else {
System.out.println("Invalid dimensions.");
}
}
}
Teacher's Note:
a) Column-wise filling requires the outer loop to iterate over columns and the inner loop over rows.
b) Verify composite number logic (numbers with more than two factors, starting from 4).
Question 8 [10]
A class Encode has been defined to replace only the vowels in a word by the next corresponding vowel and form a new word.
i.e. A → E, E → I, I → O, O → U, U → A and
a → e, e → i, i → o, o → u, and u → a
Example: Input: Institution
Output: Onstotatoun
Some of the members of the class are given below:
Class name : Encode
Data members/instance variables:
word : to store a word
length : integer to store the length of the word
new_word : to store the encoded word
Methods / Member functions:
Encode( ) : default constructor to initialize data members with legal initial values
void acceptWord( ) : to accept a word
void nextVowel( ) : to replace only the vowels from the word stored in ‘word’ by the next corresponding vowel and to assign it to ‘newword’, with the remaining alphabets unchanged
void display( ) : to display the original word along with the encrypted word
Specify the class Encode giving details of the constructor( ), void acceptWord( ), void nextVowel( ) and void display( ). Define a main ( ) function to create an object and call the functions accordingly to enable the task.
Answer:
import java.util.Scanner;
class Encode {
String word;
int length;
String new_word;
Encode() {
word = "";
length = 0;
new_word = "";
}
void acceptWord() {
Scanner sc = new Scanner(System.in);
System.out.println("Enter a word:");
word = sc.next();
length = word.length();
}
void nextVowel() {
new_word = "";
for (int i = 0; i < length; i++) {
char ch = word.charAt(i);
switch (ch) {
case 'A': new_word += 'E'; break;
case 'E': new_word += 'I'; break;
case 'I': new_word += 'O'; break;
case 'O': new_word += 'U'; break;
case 'U': new_word += 'A'; break;
case 'a': new_word += 'e'; break;
case 'e': new_word += 'i'; break;
case 'i': new_word += 'o'; break;
case 'o': new_word += 'u'; break;
case 'u': new_word += 'a'; break;
default: new_word += ch; break;
}
}
}
void display() {
System.out.println("Original word: " + word);
System.out.println("Encrypted word: " + new_word);
}
public static void main(String[] args) {
Encode obj = new Encode();
obj.acceptWord();
obj.nextVowel();
obj.display();
}
}
Teacher's Note:
a) Handle both uppercase and lowercase vowels according to the specified cyclic mapping.
b) Consonants and non-vowel characters must remain unchanged.
SECTION - C
Question 9
Shelf is a kind of data structure which can store elements with the restriction that an element can be added from the rear end and removed from the front end only.
The details of the class Shelf are given below:
Class name : Shelf
Data members/instance variables:
ele[ ] : array to hold decimal numbers
lim : maximum limit of the shelf
front : to point the index of the front end
rear : to point the index of the rear end
Methods / Member functions:
Shelf(int n ) : constructor to initialize lim=n, front= 0 and rear=0
void pushVal(double v) : to push decimal numbers in the shelf at the rear end if possible, otherwise display the message “ SHELF IS FULL ”
double popVal( ) : to remove and return the decimal number from the front end of the shelf if any, else returns −999.99
void display( ) : to display the elements of the shelf
(i) Specify the class Shelf giving details of the functions void pushVal(double) and double popVal( ). Assume that the other functions have been defined.
The main( ) function and algorithm need NOT be written. [4]
Answer:
void pushVal(double v) {
if (rear == lim) {
System.out.println(" SHELF IS FULL ");
} else {
ele[rear++] = v;
}
}
double popVal() {
if (front == rear) {
return -999.99;
} else {
return ele[front++];
}
}
Teacher's Note:
a) A shelf data structure operates on FIFO (Queue) principles.
b) Check for overflow on push and underflow on pop operations.
(ii) Name the entity described above and state its principle. [1]
Answer:
Queue. Its principle is First In, First Out (FIFO).
Teacher's Note:
a) Elements are inserted at the rear and removed from the front.
b) FIFO ensures that the element added first is removed first.
Question 10 [5]
A super class Circle has been defined to calculate the area of a circle. Define a subclass Volume to calculate the volume of a cylinder.
The details of the members of both the classes are given below:
Class name : Circle
Data members/instance variables:
radius : to store the radius in decimals
area : to store the area of a circle
Methods / Member functions:
Circle( ... ) : parameterized constructor to assign values to the data members
void cal_area() : calculates the area of a circle (πr2)
void display( ) : to display the area of the circle
Class name Volume
Data members/instance variables:
height : to store the height of the cylinder in decimals
volume : to store the volume of the cylinder in decimals
Methods / Member functions:
Volume( ... ) : parameterized constructor to assign values to the data members of both the classes
double calculate( ) : to calculate and return the volume of the cylinder using the formula (πr2h) where, r is the radius and h is the height
void display( ) : to display the area of a circle and volume of a cylinder
Assume that the super class Circle has been defined. Using the concept of inheritance, specify the class Volume giving the details of the constructor(...), double calculate( ) and void display( ).
The super class, main function and algorithm need NOT be written.
Answer:
class Volume extends Circle {
double height;
double volume;
Volume(double r, double h) {
super(r);
height = h;
volume = 0.0;
}
double calculate() {
cal_area();
volume = area * height;
return volume;
}
void display() {
super.display();
System.out.println("Volume of cylinder: " + volume);
}
}
Teacher's Note:
a) Use the super keyword to invoke the parameterized constructor of the base class.
b) Reuse inherited methods like cal_area() and display() from the superclass.
Question 11
(i) With the help of an example, briefly explain the constant factor in time complexity. [2]
Answer:
The constant factor refers to the non-asymptotic constant multipliers in the execution time of an algorithm that are ignored in Big-O notation. For example, an algorithm taking 2n steps and another taking 5n steps both have a time complexity of O(n), even though the constant factors (2 and 5) affect actual running times.
Teacher's Note:
a) Big-O notation drops constant multipliers and lower-order terms.
b) Constant factors depend on hardware and implementation details.
(ii) Answer the following questions from the diagram of a Binary Tree given below:
[Figure: Binary tree with root A, left child B with child D, and right child F with child G having children E and H]
(a) Name the external nodes of the right sub tree. [1]
Answer:
E and H
Teacher's Note:
a) External nodes (leaves) have no children.
b) Check only nodes belonging to the right subtree of root A.
(b) State the size and depth of the tree. [1]
Answer:
Size (number of nodes) = 7
Depth (height) = 3
Teacher's Note:
a) Size is the total count of nodes in the tree.
b) Depth is the maximum number of edges from the root to a leaf node.
(c) Write the post-order traversal of the above tree structure. [1]
Answer:
D, B, E, H, G, F, A
Teacher's Note:
a) Post-order traversal visits nodes in Left-Right-Root order.
b) Apply this recursively to every subtree.
Free study material for Computer Science
Model Practice Papers & Solutions for Class 12 Computer Science
Get Started with ISC Class 12 Computer Science Sample Paper 2024 with Solutions (ISC)
Access structured sample papers for Class 12 Computer Science. Solving the ISC Class 12 Computer Science Sample Paper 2024 with Solutions provided above helps students understand official exam blueprints and tackle anticipated question formats with confidence.
Key Advantages of Solving ISC Class 12 Computer Science Sample Paper 2024 with Solutions
- Curriculum Insights: Clarify chapter-wise weightage rules and question trends across Class 12.
- Gap Analysis: Check performance drops across sets to isolate specific Class 12 Computer Science topics needing extra attention.
- Time Efficiency: Working through objective and descriptive problems builds critical pacing to finish exams comfortably.
Post-Practice Strategy for Class 12 Computer Science
- Verify Answers: Compare your responses against professional teacher solutions provided in the sample paper keys.
- Error Analysis: Class 12 learners must review incorrect answers carefully to understand underlying mistakes.
- Concept Reinforcement: Consult the official NCERT book for Class 12 Computer Science when stuck before re-attempting problems.
FAQs
You can download the complete PDF for ISC Class 12 Computer Science Sample Paper 2024 with Solutions for free from StudiesToday.com. Our resources for Class 12 Computer Science are updated for the latest academic session and follow the official exam pattern.
Yes, ISC Class 12 Computer Science Sample Paper 2024 with Solutions comes with detailed, teacher-verified solutions. We have provided step-by-step answers for Computer Science to help students of Class 12 understand correct methodology and marking scheme.
Practicing this Computer Science paper helps in time management and identifying important topics. For Class 12, solving mock papers is the best way to gain confidence and reduce exam-day anxiety.
Yes, all our study materials for Class 12 Computer Science are provided in a mobile-friendly PDF format. You can easily download ISC Class 12 Computer Science Sample Paper 2024 with Solutions on your mobile device.