ISC Class 12 Computer Science Board Exam Question Paper 2013 with Solutions

Previous Year Question Papers for Class 12 Computer Science

Access comprehensive previous year question papers for Class 12 Computer Science using the ISC Class 12 Computer Science Board Exam Question Paper 2013 with Solutions. Designed to align with the 2026-27 ISC academic guidelines, these solved papers help students assess their exam readiness and understand official marking schemes.

Practice Class 12 Computer Science Exam Papers

View or download the dedicated ISC Class 12 Computer Science Board Exam Question Paper 2013 with Solutions resource below. Engaging with these previous year papers under timed conditions ensures continuous academic progress and mastery of the 2026-27 exam format.

ISC Class 12 Computer Science Board Exam Question Paper with Solutions

 

PART I

 

Question 1

 

(a) State the Principle of Duality. Write the dual of:
(P+Q').R.1 = P.R + Q'.R [2 Marks]

Answer:
The Principle of Duality states that starting with a Boolean expression, we can derive another Boolean expression (dual) by replacing each AND operator (.) with an OR operator (+), each OR operator (+) with an AND operator (.), and replacing all occurrences of 1 with 0 and 0 with 1. Identity elements (variables/literals) remain unchanged.
Dual of (P + Q').R.1 = (P.Q') + R + 0

Teacher's Note:
a) Remember to interchange operators (. and +) and constants (1 and 0) while keeping the variables (P, Q, R) exactly as they are without inversion.
b) Students often forget to change the constants 1 and 0 or mistakenly complement the variables. Complementation is not part of the Principle of Duality.

 

(b) Minimize the expression using Boolean laws:
F = (A + B').(B + CD) [2 Marks]

Answer:
F = (A + B').(B + CD)
= (A.B + A.CD + B'.B + B'.CD)
Since B'.B = 0:
= A.B + A.CD + 0 + B'.CD
= A.B + CD(A + B')

Teacher's Note:
a) Apply distributive law to expand the expression, then use complementarity law (B'.B = 0) to simplify.
b) Always look for common terms to factorize further at the end to get the minimal form.

 

(c) Convert the following cardinal form of expression into its canonical form:
F(P,Q,R) = pi (1, 3) [2 Marks]

Answer:
F(P, Q, R) = PI(1, 3)
Minterm / Maxterm indices given are 1 and 3.
1 = 001 = (P + Q + R')
3 = 011 = (P + Q' + R')
Canonical POS Form: F(P, Q, R) = (P + Q + R').(P + Q' + R')

Teacher's Note:
a) PI (capital pi) denotes Product of Sums (POS) / maxterms where 0 represents the uncomplemented variable and 1 represents the complemented variable.
b) Do not confuse pi with sigma (sigma denotes SOP / minterms).

 

(d) Using a truth table verify:
(- p => q) /\ p = (p /\ - q) V (p /\ q) [2 Marks]

Answer:

pq-p-p => q(-p => q) /\ p-qp /\ -qp /\ q(p /\ -q) V (p /\ q)
001001000
011100000
100111101
110110011

Since the columns for (-p => q) /\ p and (p /\ -q) V (p /\ q) are identical, the equivalence is verified.

Teacher's Note:
a) Recall that implication X => Y is equivalent to -X V Y. Thus -p => q is equivalent to --p V q = p V q.
b) Construct truth tables step by step with intermediate columns to avoid calculation mistakes.

 

(e) If A = 1 and B = 0, then find:
(i) (A' + 1).B
(ii) (A + B')' [2 Marks]

Answer:
Given A = 1, B = 0, so A' = 0, B' = 1.
(i) (A' + 1).B = (0 + 1).0 = (1).0 = 0.
(ii) (A + B')' = (1 + 1)' = (1)' = 0.

Teacher's Note:
a) Apply basic Boolean postulates like X + 1 = 1 and X.0 = 0 directly for quick evaluation.
b) Ensure you evaluate the inner expression before applying the inversion for complemented terms.

 

Question 2

 

(a) Differentiate between throw and throws with respect to exception handling. [2 Marks]

Answer:
1. throw is used to explicitly throw a user - defined or predefined exception instance from inside a method or block. throws is used in a method signature to declare the exceptions that can be thrown by that method.
2. throw is followed by an instance of an exception class, whereas throws is followed by class names of exception types.

Teacher's Note:
a) throw is a statement used inside the method body, while throws is a clause used in the method header.
b) Emphasize that throws propagates checked exceptions to the caller method.

 

(b) Convert the following infix notation to its postfix form:
E * (F / (G - H) * I) + J [2 Marks]

Answer:
EFGH-/I*J+

Teacher's Note:
a) Fully parenthesize or trace operator precedence carefully: (G - H) becomes GH-, then F / (GH-) becomes FGH-/.
b) Multiply by I gives FGH-/I*, multiply by E gives EFGH-/I*e... wait, expression is E * (...), so E * (FGH-/I*) gives EFGH-/I* *.

Answer:
EFGH-/I**J+

Teacher's Note:
a) Let us recheck: E * (F / (G - H) * I) + J. Inner parentheses: (G - H) -> GH-. Division: F / (GH-) -> FGH-/. Multiplication with I: (FGH-/) * I -> FGH-/I*. Multiplication with E: E * (...) -> EFGH-/I**. Addition with J: (...) + J -> EFGH-/I**J+.
b) Pay close attention to consecutive operators of the same precedence evaluated from left to right.

 

(c) Write the algorithm for push operation (to add elements) in an array based stack. [2 Marks]

Answer:
Algorithm for push(stack, top, size, item):
1. If top == size - 1, then Print "Stack Overflow" and exit.
2. Otherwise, increment top by 1: top = top + 1.
3. Set stack[top] = item.
4. End.

Teacher's Note:
a) Always check for overflow condition (top == MAX - 1 or size - 1) before inserting an element into a stack.
b) Increment the top pointer prior to assigning the value to the stack array index.

 

(d) Name the File Stream classes to:
(i) Write data to a file in binary form.
(ii) Read data from a file in text form. [2 Marks]

Answer:
(i) FileOutputStream / DataOutputStream / ObjectOutputStream
(ii) FileReader / BufferedReader

Teacher's Note:
a) Byte/binary output streams handle raw binary data, whereas character streams handle text data.
b) Mentioning standard Java library classes like FileOutputStream for binary write and BufferedReader / FileReader for text read secures full marks.

 

(e) A square matrix M [ ] [ ] of size 10 is stored in the memory with each element requiring 4 bytes of storage. If the base address at M [0] [0] is 1840, determine the address at M [4] [8] when the matrix is stored in Row Major Wise. [2 Marks]

Answer:
Address(M[i][j]) = Base Address + W * [ N * (i - LowerRow) + (j - LowerCol) ]
Given: Base = 1840, W = 4, N = 10 (number of columns), i = 4, j = 8, LowerRow = 0, LowerCol = 0.
Address(M[4][8]) = 1840 + 4 * [ 10 * (4 - 0) + (8 - 0) ]
= 1840 + 4 * [ 10 * 4 + 8 ]
= 1840 + 4 * [ 40 + 8 ]
= 1840 + 4 * [ 48 ]
= 1840 + 192
= 2032

Teacher's Note:
a) Use the standard row major formula: Base + W * (Cols * i + j) assuming 0-based indexing.
b) Verify the multiplication and addition steps carefully to avoid arithmetic errors.

 

Question 3

 

(a) The following function Recur ( ) is a part of some class. What will be the output of the function Recur ( ) when the value of n is equal to 10. Show the dry run / working. [5 Marks]
void Recur (int n)
{
    if(n > 1)
    {
        System.out.print (n + " ");
        if(n%2 != 0)
        {
            n = 3 * n + 1;
            System.out.print(n + " ");
        }
        Recur (n/2);
    }
}

Answer:
Dry Run:
- Recur(10): n = 10 > 1 (True). Print 10. 10%2 != 0 is False. Calls Recur(5).
- Recur(5): n = 5 > 1 (True). Print 5. 5%2 != 0 is True -> n = 3*5 + 1 = 16. Print 16. Calls Recur(8).
- Recur(8): n = 8 > 1 (True). Print 8. 8%2 != 0 is False. Calls Recur(4).
- Recur(4): n = 4 > 1 (True). Print 4. 4%2 != 0 is False. Calls Recur(2).
- Recur(2): n = 2 > 1 (True). Print 2. 2%2 != 0 is False. Calls Recur(1).
- Recur(1): n > 1 is False. Recursion terminates.
Output: 10 5 16 8 4 2

Teacher's Note:
a) Trace each recursive call step by step, updating parameters and printing values exactly as encountered.
b) Note that when n becomes odd inside the function, n is modified before the recursive call is made with n/2.

 

(b) The following function is a part of some class. Assume 'n' is a positive integer. Answer the given questions along with dry run / working.
int unknown (int n)
{
    int i, k;
    if (n%2 == 0)
    {
        i = n/2;
        k = 1;
    }
    else
    {
        k = n;
        n--;
        i = n/2;
    }
    while (i > 0)
    {
        k = k * i * n;
        i--;
        n--;
    }
    return k;
}
(i) What will be returned by unknown(5)? [2 Marks]
(ii) What will be returned by unknown(6)? [2 Marks]
(iii) What is being computed by unknown (int n)? [1 Mark]

Answer:
(i) unknown(5):
n = 5 (odd). k = 5, n becomes 4, i = 2.
While loop (i > 0, i=2, n=4):
- Iteration 1: k = 5 * 2 * 4 = 40. i becomes 1, n becomes 3.
- Iteration 2: k = 40 * 1 * 3 = 120. i becomes 0, n becomes 2.
Loop terminates. Returns 120.

(ii) unknown(6):
n = 6 (even). i = 3, k = 1.
While loop (i > 0, i=3, n=6):
- Iteration 1: k = 1 * 3 * 6 = 18. i becomes 2, n becomes 5.
- Iteration 2: k = 18 * 2 * 5 = 180. i becomes 1, n becomes 4.
- Iteration 3: k = 180 * 1 * 4 = 720. i becomes 0, n becomes 3.
Loop terminates. Returns 720.

(iii) It computes factorial of n (n!).

Teacher's Note:
a) Carefully trace initialization for odd and even numbers before entering the while loop.
b) Observe how the loop multiplies decreasing terms to compute the factorial product.

 

PART II

SECTION - A

Answer any three questions.

 

Question 4

(a) Given the Boolean function: F(A,B,C,D) = Sigma (0, 2, 4, 5, 8, 9, 10, 12, 13)
(i) Reduce the above expression by using 4-variable K-Map, showing the various groups (i.e. octal, quads and pairs). [4 Marks]
(ii) Draw the logic gate diagram of the reduced expression. Assume that the variables and their complements are available as inputs. [1 Mark]

Answer:
(i) K-Map simplification for Sigma (0, 2, 4, 5, 8, 9, 10, 12, 13):
- Quad 1 (m0, m2, m8, m10): C'
- Quad 2 (m0, m4, m8, m12): D'
- Quad 3 (m4, m5, m12, m13): B'.C
Reduced expression F(A, B, C, D) = C' + D' + B'.C
(ii) Logic gate diagram consists of OR gates combining terms C', D', and (B' . C).

Teacher's Note:
a) Group adjacent 1s in powers of 2 to form largest possible quads and octals.
b) Ensure all minterms are covered efficiently with minimal product terms.

 

(b) Given the Boolean function: F(P,Q,R,S) = pi (0, 1, 3, 5, 7, 8, 9, 10, 11, 14, 15)
(i) Reduce the above expression by using 4-variable K-Map, showing the various groups (i.e. octal, quads and pairs). [4 Marks]
(ii) Draw the logic gate diagram of the reduced expression. Assume that the variables and their complements are available as inputs. [1 Mark]

Answer:
(i) K-Map simplification for POS PI (0, 1, 3, 5, 7, 8, 9, 10, 11, 14, 15):
- Octal (m0, m1, m8, m9): Q + S
- Quad (m1, m3, m5, m7): P + S'
- Quad (m8, m9, m10, m11): P' + Q'
- Pair / Quad check: m14, m15 combined with others or simplified as P' + Q' + R'
Reduced expression: F(P, Q, R, S) = (Q + S).(P + S').(P' + Q')...
(ii) Logic gate diagram consists of AND gates combining the sum terms.

Teacher's Note:
a) For POS K-Map, group 0s to form maxterm sums.
b) Check corner wraparounds carefully when forming octals and quads.

 

Question 5

A Football Association coach analyzes 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 Goal keeper and Defenders perform well but the Centre players do not perform well. OR
- If all the players perform well.
The inputs are :
C - Centre players perform well.
D - Defenders perform well.
F - Forward players perform well.
G - Goalkeeper performs well.
(In all of 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.]

(a) Draw the truth table for the inputs and outputs given above and write the POS expression for X(C, D, F, G). [5 Marks]

Answer:
Truth Table generation based on conditions:
- C . F . D' => minterm 10 (1010)
- G . D . C' => minterm 6 (0110)
- C . D . F . G => minterm 15 (1111)
Output X is 1 for minterms 6, 10, 15. For POS, maxterms where output is 0: 0, 1, 2, 3, 4, 5, 7, 8, 9, 11, 12, 13, 14.
POS expression X(C, D, F, G) = PI (0, 1, 2, 3, 4, 5, 7, 8, 9, 11, 12, 13, 14)

Teacher's Note:
a) Translate each given sentence condition into standard minterms (where output = 1).
b) Convert SOP minterms to POS maxterms by taking the remaining unlisted row indices.

 

(b) Reduce X ( C, D, F, G ) using Karnaugh's Map.
Draw the logic gate diagram for the reduced POS expression for X ( C, D, F, G ) using AND and OR gate. You may use gates with two or more inputs. Assume that the variable and their complements are available as inputs. [5 Marks]

Answer:
K-Map reduction for POS gives the minimized expression.
Reduced POS expression: X = (C + D').(C' + G).(D + F + G)...\br />Logic gate diagram uses OR gates for sums and a final AND gate for the product.

Teacher's Note:
a) Group 0s in the K-Map for POS expression reduction.
b) Draw clear logic symbols using standard AND/OR gate notations.

 

Question 6

(a) In the following truth table x and y are inputs and B and D are outputs:

xyBD
0000
0111
1001
1100

Answer the following questions:
(i) Write the SOP expression for D. [1 Mark]
(ii) Write the POS expression for B. [1 Mark]
(iii) Draw a logic diagram for the SOP expression derived for D, using only NAND gates. [1 Mark]

Answer:
(i) SOP for D: D = x'y + xy'
(ii) POS for B: B = (x + y).(x + y').(x' + y')
(iii) Logic diagram for D using only NAND gates (Exclusive - OR implemented with NANDs).

Teacher's Note:
a) SOP takes minterms where output is 1. D is 1 when (0,1) and (1,0).

Teacher's Note:
b) POS takes maxterms where output is 0 for B.

 

(b) Using a truth table, verify if the following proposition is valid or invalid:
(a => b) /\ (b => c) = (a => c) [3 Marks]

Answer:
Truth table verifies that (a => b) /\ (b => c) implies (a => c), showing validity (Hypothetical Syllogism).

Teacher's Note:
a) Implication X => Y is false only when X is true and Y is false.
b) Verify all 8 rows for 3 variables (a, b, c).

 

(c) From the logic circuit diagram given below, name the outputs (1), (2) and (3). Finally derive the Boolean expression and simplify it to show that it represents a logic gate. Name and draw the logic gate. [4 Marks]
[Figure: Logic circuit with inputs X, Y, Z, NOT gates, AND gates, and OR gates producing outputs (1), (2), (3) and F(X,Y,Z)]

Answer:
(1) Output 1 = X . Y'
(2) Output 2 = Y' . Z
(3) Output 3 = (X . Y') + (Y' . Z)
Simplified expression: Y'(X + Z), which represents a combinational logic block / logic gate combination.

Teacher's Note:
a) Trace outputs gate by gate from inputs X, Y, Z.
b) Factorize common literals like Y' to simplify the final Boolean expression.

 

Question 7

(a) What are Decoders? How are they different from Encoders? [2 Marks]

Answer:
1. A Decoder is a combinational circuit that converts n input lines to $2^n$ unique output lines. An Encoder performs the reverse operation, converting $2^n$ input lines to n output lines.
2. Decoders are used for routing data and selecting memory chips, while Encoders are used for generating binary codes corresponding to active inputs.

Teacher's Note:
a) Clearly state the input-to-output relationship for both devices.
b) Give contrasting operational examples.

 

(b) Draw the truth table and a logic gate diagram for a 2 to 4 Decoder and briefly explain its working. [4 Marks]

Answer:
Truth table for 2 to 4 Decoder with inputs A, B and outputs Y0, Y1, Y2, Y3.
Working: When inputs are binary combinations (00, 01, 10, 11), exactly one corresponding output line goes HIGH while others remain LOW.

Teacher's Note:
a) Show the truth table with 2 inputs and 4 outputs.
b) Use AND gates connected with input lines and their complements.

 

(c) A combinational logic circuit with three inputs P, Q, R produces output 1 if and only if an odd number of 0's are inputs.
(i) Draw its truth table.
(ii) Derive a canonical SOP expression for the above truth table.
(iii) Find the complement of the above derived expression using De Morgan's theorem and verify if it is equivalent to its POS expression. [4 Marks]

Answer:
(i) Truth table for P, Q, R with odd number of 0s (e.g., 001, 010, 100, 111 have odd number of 0s -> output 1).
(ii) Canonical SOP: F = P'Q'R + P'QR' + PQ'R' + PQR
(iii) Complement using De Morgan's theorem yields the corresponding POS form.

Teacher's Note:
a) Count 0s carefully for each input combination.
b) Apply De Morgan's Law ((A + B)' = A' . B') to derive the complement.

 

SECTION - B

Answer any two questions.

 

Question 8

An emirp number is a number which is prime backwards and forwards. Example: 13 and 31 are both prime numbers. Thus, 13 is an emirp number.
Design a class Emirp to check if a given number is Emirp number or not. Some of the members of the class are given below:
Class name: Emirp
Data members / instance variables: n, rev, f
Member functions: Emirp(int nn), int isprime(int x), void isEmirp()
[10 Marks]

Answer:
import java.util.Scanner;
public class Emirp {
    int n, rev, f;
    public Emirp(int nn) {
        n = nn;
        rev = 0;
        f = 2;
    }
    public int isprime(int x) {
        if (x <= 1) return 0;
        if (f >= x) return 1;
        if (x % f == 0) return 0;
        f++;
        return isprime(x);
    }
    public void isEmirp() {
        int temp = n;
        while (temp > 0) {
            rev = rev * 10 + (temp % 10);
            temp /= 10;
        }
        int f1 = isprime(n);
        f = 2;
        int f2 = isprime(rev);
        if (f1 == 1 && f2 == 1)
            System.out.println(n + " is an Emirp number.");
        else
            System.out.println(n + " is not an Emirp number.");
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("Enter a number:");
        int num = sc.nextInt();
        Emirp ob = new Emirp(num);
        ob.isEmirp();
    }
}

Teacher's Note:
a) Ensure recursive prime checking resets instance variable f appropriately before checking the reversed number.
b) Follow exact variable names and method signatures specified in the question.

 

Question 9

Design a class Exchange to accept a sentence and interchange the first alphabet with the last alphabet for each word in the sentence, with single letter word remaining unchanged... [10 Marks]

Answer:
import java.util.Scanner;
public class Exchange {
    String sent, rev;
    int size;
    public Exchange() {
        sent = "";
        rev = "";
        size = 0;
    }
    public void readsentence() {
        Scanner sc = new Scanner(System.in);
        System.out.println("Enter a sentence terminated by a full stop:");
        sent = sc.nextLine();
        size = sent.length();
    }
    public void exfirstlast() {
        String word = "";
        for (int i = 0; i < size; i++) {
            char ch = sent.charAt(i);
            if (ch == ' ' || ch == '.') {
                if (word.length() <= 1) {
                    rev += word + ch;
                 } else {
                    char first = word.charAt(0);
                    char last = word.charAt(word.length() - 1);
                    String mid = word.substring(1, word.length() - 1);
                    rev += last + mid + first + ch;
                }
                word = "";
            } else {
                word += ch;
            }
        }
    }
    public void display() {
        System.out.println("Original: " + sent);
        System.out.println("Changed: " + rev);
    }
    public static void main(String[] args) {
        Exchange ob = new Exchange();
        ob.readsentence();
        ob.exfirstlast();
        ob.display();
    }
}

Teacher's Note:
a) Handle word extraction accurately by checking space or full stop delimiters.
b) Ensure single-letter words are left unchanged as per problem statement.

 

Question 10

A class Matrix contains a two dimensional integer array of order [m x n]... Design a class Matrix to find the difference of the two matrices. [10 Marks]

Answer:
import java.util.Scanner;
public class Matrix {
    int arr[][] = new int[25][25];
    int m, n;
    public Matrix(int mm, int nn) {
        m = mm;
        n = nn;
    }
    public void fillarray() {
        Scanner sc = new Scanner(System.in);
        System.out.println("Enter matrix elements:");
        for (int i = 0; i < m; i++) {
            for (int j = 0; j < n; j++) {
                arr[i][j] = sc.nextInt();
            }
        }
    }
    public Matrix SubMat(Matrix A) {
        Matrix res = new Matrix(m, n);
        for (int i = 0; i < m; i++) {
            for (int j = 0; j < n; j++) {
                res.arr[i][j] = A.arr[i][j] - this.arr[i][j];
            }
        }
        return res;
    }
    public void display() {
        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 cols:");
        int r = sc.nextInt();
        int c = sc.nextInt();
        Matrix m1 = new Matrix(r, c);
        Matrix m2 = new Matrix(r, c);
        m1.fillarray();
        m2.fillarray();
        Matrix m3 = m1.SubMat(m2);
        m3.display();
    }
}

Teacher's Note:
a) Ensure SubMat subtracts current object from parameterized object properly as specified.
b) Verify array bounds do not exceed 25x25.

 

SECTION - C

Answer any two questions.

 

Question 11

A super class Perimeter has been defined to calculate the perimeter of a parallelogram. Define a subclass Area to compute the area of the parallelogram... [10 Marks]

Answer:
class Perimeter {
    double a, b;
    public Perimeter(double len, double brd) {
        a = len;
        b = brd;
    }
    public double Calculate() {
        return 2 * (a + b);
    }
    public void show() {
        System.out.println("Length: " + a + ", Breadth: " + b);
        System.out.println("Perimeter: " + Calculate());
    }
}
class Area extends Perimeter {
    double h, area;
    public Area(double len, double brd, double ht) {
        super(len, brd);
        h = ht;
        area = 0.0;
    }
    public void doarea() {
        area = b * h;
    }
    public void show() {
        super.show();
        System.out.println("Height: " + h + ", Area: " + area);
    }
}

Teacher's Note:
a) Use super keyword to invoke the superclass constructor and methods properly.
b) Maintain proper inheritance hierarchy with extends keyword.

 

Question 12

A doubly queue is a linear data structure which enables the user to add and remove integers from either ends... Define a class Dequeue... [10 Marks]

Answer:
public class Dequeue {
    int arr[] = new int[100];
    int lim, front, rear;
    public Dequeue(int l) {
        lim = l;
        front = 0;
        rear = 0;
    }
    public void addfront(int val) {
        if (front == 0) {
            System.out.println("Overflow from front");
        } else {
            arr[--front] = val;
        }
    }
    public void addrear(int val) {
        if (rear == lim) {
            System.out.println("Overflow from rear");
        } else {
            arr[rear++] = val;
        }
    }
    public int popfront() {
        if (front == rear) {
            return -9999;
        } else {
            return arr[front++];
        }
    }
    public int poprear() {
        if (rear == 0 || front == rear) {
            return -9999;
        } else {
            return arr[--rear];
        }
    }
}

Teacher's Note:
a) Handle boundary conditions and overflow/underflow checks accurately for both front and rear ends.
b) Return -9999 under empty queue conditions as requested.

 

Question 13

(a) A linked list is formed from the objects of the class,
class Node
{
    int item;
    Node next;
}
Write an Algorithm OR a Method to count the number of nodes in the linked list. The method declaration is given below:
int count(Node ptr_start) [4 Marks]

Answer:
int count(Node ptr_start) {
    int cnt = 0;
    Node temp = ptr_start;
    while (temp != null) {
        cnt++;
        temp = temp.next;
    }
    return cnt;
}

Teacher's Note:
a) Traverse the linked list using a temporary pointer until it reaches null.
b) Increment counter at each node.

 

(b) What is the Worst Case complexity of the following code segment:
(i) for (int p = 0; p < N; p++)
{
    for (int q = 0; q < M; q++)
    {
        Sequence of statements;
    }
}
for (int r = 0; r < X; r++)
{
    Sequence of statements;
}
(ii) How would the complexity change if all the loops went upto the same limit N? [2 Marks]

Answer:
(i) O(N*M + X)
(ii) O(N^2 + N) = O(N^2)

Teacher's Note:
a) Nested loops multiply their complexities, while sequential loops add them.
b) Drop lower order terms and constant multipliers when expressing Big-O complexity.

 

(c) Answer the following from the diagram of a Binary Tree given below:
(i) Preorder Transversal of tree.
(ii) Children of node E.
(iii) Left subtree of node D.
(iv) Height of the tree when the root of the tree is at level 0. [4 Marks]

[Figure: Binary Tree with root A, left child I, right child B. Node B has children C and D. Node D has children E and F. Node E has children G and H.]

Answer:
(i) Preorder Traversal: A, I, B, C, D, E, G, H, F
(ii) Children of node E: G, H
(iii) Left subtree of node D: Subtree rooted at E (containing E, G, H)
(iv) Height of the tree: 4 (levels 0 to 4)

Teacher's Note:
a) Preorder follows Root -> Left -> Right traversal order.
b) Tree height is counted as the maximum number of edges or levels from root to leaf.

Free study material for Computer Science

Practice Exam Question Papers for Class 12 Computer Science ISC Class 12 Computer Science Board Exam Question Paper 2013 with Solutions

Understanding Exam Patterns with ISC Class 12 Computer Science Board Exam Question Paper 2013 with Solutions

Review authentic examination papers for Class 12 Computer Science. Working through the ISC Class 12 Computer Science Board Exam Question Paper 2013 with Solutions allows learners to decode recurring question trends and familiarize themselves with official ISC evaluation standards.

Why Practice Class 12 Computer Science Question Papers?

Regular simulation of exam environments using past question documents builds crucial pacing abilities and eliminates last-minute test anxiety during Class 12 Computer Science assessments.

Additional Study Resources for Class 12 Computer Science

Pair your past paper revision with our official Class 12 Computer Science sample papers and online practice modules to achieve total curriculum mastery.

FAQs

Where can I download the official PDF for ISC Class 12 Computer Science Board Exam Question Paper 2013 with Solutions?

The ISC Class 12 Computer Science Board Exam Question Paper 2013 with Solutions is available for download on StudiesToday.com. It includes complete set with all sections so that Class 12 students can practice with the exact same paper that came in the ISC exams.

Are the solutions for ISC Class 12 Computer Science Board Exam Question Paper 2013 with Solutions based on the official ISC marking scheme?

Yes, the solutions for ISC Class 12 Computer Science Board Exam Question Paper 2013 with Solutions are prepared by subject matter experts as per official marking scheme. Class 12 students will understand the structure of answers and 'step-marks' methodology Computer Science.

How does solving ISC Class 12 Computer Science Board Exam Question Paper 2013 with Solutions help in preparing for the 2026 exams?

Solving previous year papers like ISC Class 12 Computer Science Board Exam Question Paper 2013 with Solutions is important to understand repeat themes and question difficulty levels of Computer Science. It helps Class 12 students to test their time management skills too.

Can I access ISC Class 12 Computer Science Board Exam Question Paper 2013 with Solutions in different languages?

Yes, where applicable, ISC Class 12 Computer Science Board Exam Question Paper 2013 with Solutions is available in both English and Hindi mediums. All students from Class 12 can access Computer Science study material in their preferred language.

Is there a charge to download the ISC Class 12 Computer Science solved papers?

No, all previous year question papers on StudiesToday, including ISC Class 12 Computer Science Board Exam Question Paper 2013 with Solutions, are provided free of charge in mobile-friendly PDF.