Prashnikaप्रश्निका
Code
About
Computer ScienceClass 12

Recursion - ISC Class 12 Computer Science Questions with Answers

31 past-paper questions on Recursion from ISC Class 12 Computer Science papers (2026-2017), newest first, in full. Questions 1-20 are on this page, 20 to a page. Tap "Show answer" under a question to see its answer. The syllabus covers Concept of recursion, Recursive methods, Base case and Tower of Hanoi.

31questions
8years
2026newest
20266 questions
2 marks · OutputOpen: What will the function workOut(220) return?

What is the output of the following code?

What will the function workOut(220) return?
Show the code
The following function workOut( ) is a part of some class. Assume 'n' is a positive integer.
String workOut (int n)
{
    if (n == 0)
        return "";
    int rem = n % 16;
    char cr = (rem < 10) ? (char)(rem + '0') : (char)(rem - 10 + 'A');
    return workOut (n / 16) + cr;
}
Show answer

Answer

Dry run of workOut(220): Call 1: workOut(220) -> rem = 220 % 16 = 12 -> cr = (char)(12 - 10 + 'A') = 'C'; calls workOut(13) + 'C' Call 2: workOut(13) -> rem = 13 % 16 = 13 -> cr = (char)(13 - 10 + 'A') = 'D'; calls workOut(0) + 'D' Call 3: workOut(0) returns "" Unwinding: Call 2 returns "" + 'D' = "D" Call 1 returns "D" + 'C' = "DC" Return value: "DC"
2 marks · Short answerOpen: State the role of base case and recursive case in a recursive method.

Answer the following.

State the role of base case and recursive case in a recursive method.
Show answer

Answer

Base case: The terminating condition of a recursive method — the simplest instance of the problem that is solved directly, without making any further recursive call. It stops the chain of recursive calls, preventing infinite recursion (and stack overflow), and is where the results start being returned/unwound back up the call chain. Recursive case: The part of the method where it calls itself with a smaller/simpler version of the original problem, moving the problem progressively closer to the base case with every call. Together, the recursive case breaks the problem down step by step, and the base case stops that breakdown and begins building up the final result.
8 marks · ProgramOpen: A class Trimorphic has been defined to accept a positive integer from the user…

Write the program described below.

A class Trimorphic has been defined to accept a positive integer from the user and display if it is a Trimorphic number or not. [A number is said to be Trimorphic if the cube of the number ends with the number itself.] Example 1: $24^3 = 13824$ ends with 24 Example 2: $5^3 = 125$ ends with 5 The details of the members of the class are given below: Class name : Trimorphic Data members/instance variables: n : to store the number cube : to store the cube of the number Methods/Member functions: Trimorphic( ) : constructor to initialise the data members with legal initial values void accept( ) : to accept a number boolean check(int num, long c) : to compare num with the ending digits of c using recursive technique void result( ) : to check whether the given number is a trimorphic number by invoking the function check( ) and to display an appropriate message Specify the class Trimorphic giving the details of the constructor( ), void accept( ), boolean check(int, long) and void result( ). Define the main( ) function to create an object and call the functions accordingly to enable the task.
Show answer

Answer

import java.util.Scanner;

class Trimorphic
{
    int n;
    long cube;

    Trimorphic()
    {
        n = 0;
        cube = 0L;
    }

    void accept()
    {
        Scanner sc = new Scanner(System.in);
        System.out.print("Enter a positive integer: ");
        n = sc.nextInt();
        cube = (long) n * n * n;
    }

    boolean check(int num, long c)
    {
        if (num == 0)
            return true;
        if (num % 10 != c % 10)
            return false;
        return check(num / 10, c / 10);
    }

    void result()
    {
        if (check(n, cube))
            System.out.println(n + " is a Trimorphic number.");
        else
            System.out.println(n + " is not a Trimorphic number.");
    }

    public static void main(String[] args)
    {
        Trimorphic obj = new Trimorphic();
        obj.accept();
        obj.result();
    }
}
Explanation: The constructor initialises n and cube. accept() inputs a positive integer and calculates its cube. check(num, c) recursively compares the last digits of num and c; if num becomes 0, all digits matched and it returns true, otherwise if any pair of digits differ it returns false. result() calls check() and displays the message.
3 marks · Case basedOpen: public int justDoIt(int num) { if (num == 0) return 0; int c = justDoIt(num /…

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);
}
The following function justDoIt() is a part of some class. Assume num is a positive integer. Answer the questions given below along with dry run / working.
(a)[2]
What will the function justDoIt( ) return when num = 126?
(b)[1]
What is the function justDoIt( ) performing apart from recursion?
Show answer

Answer (a)

Dry run of justDoIt(126) (verified by running the code): justDoIt(126) → calls justDoIt(63); bit=126%2=0 → prints '0' justDoIt(63) → calls justDoIt(31); bit=63%2=1 → prints '1' justDoIt(31) → calls justDoIt(15); bit=31%2=1 → prints '1' justDoIt(15) → calls justDoIt(7); bit=15%2=1 → prints '1' justDoIt(7) → calls justDoIt(3); bit=7%2=1 → prints '1' justDoIt(3) → calls justDoIt(1); bit=3%2=1 → prints '1' justDoIt(1) → calls justDoIt(0); bit=1%2=1 → prints '1' justDoIt(0) → returns 0 (base case) As the calls unwind, the bits print in order: 1111110 (this is 126 written in binary), and the count c accumulates 1 for every bit equal to 1 — there are six 1's among the seven bits. Return value: 6

Answer (b)

Apart from recursion, the function displays (prints) the binary equivalent of num, one bit at a time from the most significant bit to the least significant bit, and it counts and returns the number of 1's (set bits) present in that binary representation.
2 marks · DifferentiateOpen: State any two differences between iteration and recursion.

Differentiate between the following.

State any two differences between iteration and recursion.
Show answer

Answer

Two differences between iteration and recursion: 1. Execution mechanism: Iteration repeatedly executes a block of statements using looping constructs (for, while, do-while) until a condition is satisfied, whereas recursion repeatedly executes code by a method calling itself with a smaller problem until a base condition is reached. 2. Memory overhead: Iteration does not use additional call stack frames for each cycle (O(1) auxiliary stack space), whereas recursion allocates a new stack frame on the call stack for each call, consuming additional memory and carrying the risk of StackOverflowError if the recursion depth is too large.
202512 questions
2 marks · Case basedOpen: Following method is a part of a class MyArray. int check(int m[ ], int i) { if…

Answer the following questions.

Following method is a part of a class MyArray.
int check(int m[ ], int i) 
{ 
    if (i <= 0)  
    { 
        return 0; 
    } 
    return check(m, i - 2) + m[i - 1]; 
} 

public static void main( ) 
{ 
    int m[ ] = {1, 2, 3, 4}; 
    int ans = check(m, m.length); 
    System.out.println(ans); 
}
(a)[1]
Predict the output of the code considering there is no compilation error. Show the working.
(b)[1]
Considering the if condition is changed to if(i < 0), how will it affect the output?
Show answer

Answer (a)

Output: 6 Working: check(m,4) = check(m,2) + m[3] = check(m,2) + 4 check(m,2) = check(m,0) + m[1] = check(m,0) + 2 check(m,0): since i=0 <= 0, returns 0 So check(m,2) = 0 + 2 = 2, and check(m,4) = 2 + 4 = 6. ans = 6

Answer (b)

With if(i < 0), the base case i=0 is no longer true (0 is not < 0), so recursion does not stop there: check(m,0) calls check(m,-2) + m[-1], and m[-1] is an invalid array index. The program throws an ArrayIndexOutOfBoundsException (index -1) instead of returning a value, so it crashes rather than printing 6.
3 marks · Case basedOpen: The following function int solve( ) is a part of some class. Assume 'm' and 'n'…

Answer the following questions on the given code.

The following function int solve( ) is a part of some class. Assume 'm' and 'n' are positive integers. Answer the questions given below with dry run / working.
int solve(int m, int n)
{
    int k=1;
    if(m<0)
        return -k;
    else if(m==0)
        return m;
    else
        return k+(solve(m-n, n+2));
}
(a)[2]
What will the function solve( ) return if: (1) $m = 16, n = 1$ (2) $m = 9, n = 1$
(b)[1]
What is the function solve( ) performing apart from recursion?
Show answer

Answer (a)

Dry run for m=16, n=1: solve(16,1) = 1 + solve(15,3) solve(15,3) = 1 + solve(12,5) solve(12,5) = 1 + solve(7,7) solve(7,7) = 1 + solve(0,9) solve(0,9) = 0 (since m==0) Unwinding: solve(7,7)=1, solve(12,5)=2, solve(15,3)=3, solve(16,1)=4 solve(16,1) returns 4 Dry run for m=9, n=1: solve(9,1) = 1 + solve(8,3) solve(8,3) = 1 + solve(5,5) solve(5,5) = 1 + solve(0,7) solve(0,7) = 0 Unwinding: solve(5,5)=1, solve(8,3)=2, solve(9,1)=3 solve(9,1) returns 3

Answer (b)

Apart from recursion, the function counts the number of recursive calls made (i.e. how many times n, then n+2, n+4, ... can be successively subtracted from m) before m reaches exactly 0.
3 marks · Case basedOpen: The following function think( ) is part of some class. Assume f is the lower…

Answer the following questions on the given code.

The following function think( ) is part of some class. Assume $f$ is the lower bound and $l$ is the upper bound of $arr[\ ]$. Answer the questions given below along with the dry run / working.
int think(int arr[ ], int f, int l)
{
    if (f > l)
        return 0;
    else
    {
        int current = (arr[f] % 2 == 0) ? arr[f] : 0;
        return current + think (arr, f + 1, l);
    }
}
(a)[2]
What will the function think( ) return, if $arr[\ ] = \{9, 7, 12, 16, 19, 25\}$, $f = 0$ and $l = 5$?
(b)[1]
What is the function think( ) performing apart from recursion?
Show answer

Answer (a)

Dry run: think(arr,0,5) for arr[] = {9,7,12,16,19,25} think(0): arr[0]=9 (odd) → current=0 → 0 + think(1) think(1): arr[1]=7 (odd) → current=0 → 0 + think(2) think(2): arr[2]=12 (even) → current=12 → 12 + think(3) think(3): arr[3]=16 (even) → current=16 → 16 + think(4) think(4): arr[4]=19 (odd) → current=0 → 0 + think(5) think(5): arr[5]=25 (odd) → current=0 → 0 + think(6) think(6): f=6 > l=5 → returns 0 Unwinding: think(5)=0, think(4)=0, think(3)=16+0=16, think(2)=12+16=28, think(1)=0+28=28, think(0)=0+28=28 think() returns 28

Answer (b)

Apart from recursion, the function computes and returns the sum of all the even elements present in the array arr[] from index f to index l.
1 mark · MCQOpen: Recursion takes toll on memory. Which of the following option is the reason for…

Choose the correct option.

Recursion takes toll on memory. Which of the following option is the reason for it?
  • (a)Every recursive call is placed in a call stack memory.
  • (b)Every recursive call is resolved in Last-In-First-Out (LIFO) manner.
  • (c)Values of local variables are maintained until each of the calls are resolved.
  • (d)All of the above.
Show answer

Answer

Correct option: d

Answer: (d) All of the above. Each recursive call is pushed onto the call stack (a), calls are resolved in LIFO order (b), and the local variables/parameters of each call must be kept until that call returns (c). All three together explain why recursion costs more memory than iteration.
2 marks · Short answerOpen: Following code gives a StackOverException. public class StackOverflow { public…

Answer the following question.

Following code gives a StackOverException.
public class StackOverflow
{
    public static void main()
    {
        callMe();
    }
    public static void callMe()
    {
        callMe();
    }
}
Stack is a data structure whereas recursion is related to a method. Why does the above code give an exception with stack overflow?
Show answer

Answer

Each call to callMe() creates a new activation record (return address, parameters, local variables) that is pushed onto the call stack, and since callMe() calls itself with no base/terminating condition, calls keep being pushed and none are ever popped. The stack has a fixed maximum size, and once that limit is exceeded by the endless pushes, the JVM throws a StackOverflowError (reported as a stack overflow exception).
1 mark · Assertion-reasonOpen: Recursion utilises more memory as compared to iteration. Given below are two…

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.

Given below are two statements marked Assertion and Reason. Read the two statements carefully and choose the correct option.
  • (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.
Show answer

Answer

Official answer key

Correct option: (b)

Answer: (b) Both Assertion and Reason are true but Reason is not the correct explanation for Assertion. Recursion does use more memory than iteration, since each recursive call adds a new frame to the call stack, so the Assertion is true. The Reason (that recursion's time complexity is higher due to call-stack overhead) is also a true statement in general, but it is a statement about time complexity, not about why recursion uses more memory (a space argument) - so it does not explain the Assertion.
10 marks · ProgramOpen: A class LCM has been defined to find the Lowest Common Multiple of two…

Write the program described below.

A class LCM has been defined to find the Lowest Common Multiple of two integers. Some of the data members and member functions are given below: Class name : LCM Data members/instance variables: n1 : to store an integer number n2 : to store an integer number large : integer to store the largest from n1,n2 sm : integer to store the smallest from n1,n2 l : to store lcm of two numbers Methods / Member functions: LCM( ) : default constructor to initialize data members with legal initial values void accept( ) : to accept n1 and n2 int getLCM( ) : returns the lcm of n1 and n2 using the recursive technique void display( ) : to print the numbers n1, n2 and lcm Specify the class LCM giving details of the constructor( ), void accept( ), int getLCM() and void display( ). Define a main ( ) function to create an object and call the member functions accordingly to enable the task.
Show answer

Answer

Official answer key
import 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).
10 marks · ProgramOpen: [Recursion program] Design a class Spy to check if a number is a Spy number or…

Write the program described below.

[Recursion program] Design a class Spy to check if a number is a Spy number or not. A spy number is a number where the sum of its digits equals the product of its digits. For example, 1124 is a spy number, the sum of its digits is $1+1+2+4=8$ and the product of its digits is $1 \times 1 \times 2 \times 4=8$. Class name : Spy Data Members: num : to store the number Member methods: Spy(int nn) : initialize the data member num=nn int sumOfDigits(int i) : returns the sum of digits of num using recursive technique int prodOfDigits(int i) : returns the product of digits of num using recursive technique void check( ) : checks whether the given number is a Spy number or not by invoking the functions sumOfDigits( ) and prodOfDigits( ) and displays appropriate message Specify the class Spy giving details of the functions int sumOfDigits(int ), void check( ), int prodOfDigits(int). Assume that the data member and constructor are already defined. Define a main method to create an object and call the functions accordingly to enable the task.
Show answer

Answer

class Spy
{
    int num;   // stores the number

    // constructor (assumed already defined)
    Spy(int nn)
    {
        num = nn;
    }

    // recursively returns the sum of the digits of i
    int sumOfDigits(int i)
    {
        if (i == 0)
            return 0;
        else
            return i % 10 + sumOfDigits(i / 10);
    }

    // recursively returns the product of the digits of i
    int prodOfDigits(int i)
    {
        if (i == 0)
            return 1;
        else
            return (i % 10) * prodOfDigits(i / 10);
    }

    // checks whether num is a Spy number and displays the result
    void check()
    {
        int s = sumOfDigits(num);
        int p = prodOfDigits(num);
        if (s == p)
            System.out.println(num + " is a Spy number.");
        else
            System.out.println(num + " is not a Spy number.");
    }

    public static void main(String args[])
    {
        Spy ob = new Spy(1124);
        ob.check();
    }
}
Explanation: sumOfDigits(i) and prodOfDigits(i) each recursively strip the last digit of i (i%10), combine it with the recursive result on the remaining digits (i/10), and stop at i==0 (base case 0 for the sum so the trailing digit isn't counted twice, base case 1 for the product so it doesn't zero out the result). check() compares the two and prints the appropriate message. Tested (run for real): 1124 (sum=8, product=8) was correctly reported as a Spy number, 123 (sum=6, product=6) and 9 (single digit, sum=product=9) were also correctly reported as Spy numbers, and 122 (sum=5, product=4) was correctly reported as not a Spy number.
3 marks · Case basedOpen: The following function getIt() is a part of some class. Assume x is a positive…

Answer the following questions on the given code.

The following function getIt() is a part of some class. Assume x is a positive integer, f is the lower bound of arr[ ] and l is the upper bound of the arr[ ]. Answer the questions given below along with dry run/working.
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; 
    } 
(a)[2]
What will the function getIt( ) return if arr[ ] = {10,20,30,40,50} and x=40?
(b)[1]
What is function getIt( ) performing apart from recursion?
Show answer

Answer (a)

Official answer key
The function getIt() performs a Binary Search on the sorted array. For $arr[\ ]=\{10,20,30,40,50\}$, $x=40$, $f=0$, $l=4$ (dry run, verified by running the corrected code): Call 1: getIt(40,arr,0,4) -> m=(0+4)/2=2, arr[2]=30<40 -> call getIt(40,arr,3,4) Call 2: getIt(40,arr,3,4) -> m=(3+4)/2=3, arr[3]=40==40 -> returns m=3 The function returns 3.

Answer (b)

Official answer key
Apart from recursion, the function getIt() is performing a Binary Search on the sorted array arr[ ] to locate the position (index) of the value x, returning its index if found, or -1 if x is not present in the array.
2 marks · Short answerOpen: A student has written the following code. It is written to check whether a…

Answer the following question.

A student has written the following code. It is written to check whether a string is palindrome or not. However, the code is not giving the desired result when the parameter “MADAM” is passed to the method isPalindrome(). Analyse the code and find out the logical error.
public class PalindromeTesting 
{     
    public static boolean isPalindrome(String word) 
    {       
        if (word.length( ) < 1) 
        {  
            return true; 
        }  
        else if (word.charAt(0) != word.charAt(word.length( ) - 1))  
        {  
            return false; 
        }  
        else   
        {  
            return isPalindrome(word.substring(0, word.length( ) - 1)); 
        } 
    } 
}
Show answer

Answer

Logical error: in the recursive call isPalindrome(word.substring(0, word.length()-1)), only the last character is dropped; the first character (already compared) is not dropped. So the next comparison compares the original first character again, but against a different (wrong) last character, giving a wrong result (isPalindrome("MADAM") incorrectly returns false). The substring should drop both ends: it should be word.substring(1, word.length()-1).
1 mark · MCQOpen: If binary search technique uses recursion instead of iteration, the code: i…

Choose the correct option.

If binary search technique uses recursion instead of iteration, the code: i. will contain two base cases. ii. will contain two recursive cases. iii. when executed will lead to an exception, stack overflow. Which of the above is valid?
  • (a)i and ii
  • (b)ii and iii
  • (c)i and iii
  • (d)Only iii
Show answer

Answer

Correct option: a

Answer: (a) i and ii. A recursive binary search needs two base cases - element found, and search range exhausted (low > high) - and its code contains two possible recursive calls, one for the left half and one for the right half (only one executes per call). Statement iii is false: since the search range halves each call, the recursion depth is only about log2(n), so it does not cause a stack overflow.
1 mark · Assertion-reasonOpen: Recursion utilises more memory as compared to iteration.

Study the Assertion and Reason and choose the correct option.

Assertion: Recursion utilises more memory as compared to iteration.

Reason: Absence of base case leads to infinite recursion.

  • (a)Both A and R are true, and R is the correct explanation of A.
  • (b)Both A and R are true, and R is not the correct explanation of A.
  • (c)A is true, but R is false.
  • (d)A is false, but R is true.
Show answer

Answer

Correct option: b

Answer: (b) Both A and R are true, but R is not the correct explanation of A. Both statements are true: recursion does use more memory than iteration because each call adds a stack frame, and a missing base case does cause infinite recursion. But R explains why recursion without a base case fails to terminate, not why recursion in general (even with a base case) uses more memory than iteration, so R does not explain A.
20242 questions
3 marks · Case basedOpen: The following functions are a part of some class: void Try(char ch[],int x) {…

Answer the following questions on the given code.

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)[2]
What will the output of Try( ) when the value of ch[]={‘P’, ‘L’,‘A’, ‘Y’} and x=1?
(b)[1]
What will the output of Try1( ) when the value of n=”SKY”?
Show answer

Answer (a)

Output: PLAY PALY (Verified by running the code.) Try(ch,1) first prints the array as given: PLAY. Since $x(1) < ch.length/2 (=2)$, it swaps ch[1] and ch[4-1-1]=ch[2], i.e. swaps 'L' and 'A', giving PALY, then calls Try(ch,2). This call prints the array again: PALY. Now $x(2)$ is not $< 2$, so the if-block is skipped and the recursion stops.

Answer (b)

Output: SKY YKS Try1("SKY") copies the string into a char array and calls Try(c,0), which first prints SKY. Since $0 < 3/2 (=1)$, it swaps c[0] and c[3-0-1]=c[2], i.e. 'S' and 'Y', giving YKS, then calls Try(c,1), which prints YKS. Now $x(1)$ is not $<1$, so the recursion stops.
3 marks · Case basedOpen: int jolly(int[ ] x, int n, int m) { if (n < 0) return m; else if(n<x.length) m…

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);
}
The following function is a part of some class:
(a)[2]
What will be the output of jolly( ) when the value of x[ ]={6,3,4,7,1} , n=4 and m=0?
(b)[1]
What function does jolly() perform, apart from recursion?
Show answer

Answer (a)

The output is 7. Tracing jolly(x,4,0) with x={6,3,4,7,1}: m is updated at each call to the larger of the current x[n] and m, as n decreases from 4 to 0 (m becomes 1, then 7, and stays 7), then n becomes -1 and m=7 is returned. Output: 7

Answer (b)

Apart from recursion, jolly() finds and returns the maximum (largest) element present in the array x[ ].

About Recursion

Recursion is a unit of the ISC Class 12 Computer Science syllabus.

The syllabus lists these topics: Concept of recursion, Recursive methods, Base case and Tower of Hanoi.

Prashnika has 31 past-paper questions on Recursion, from papers of 2017-2026, asked in 8 different years. By kind: Case based (9), Output (5), Short answer (5) and Program (5). They carry between 1 and 10 marks, and most are worth 3 marks.

To practise, use the Recursion visualiser, the Tower of Hanoi visualiser and the paper generator, which can build a practice paper from this chapter.

Common questions

What topics are in Recursion in ISC Class 12 Computer Science?

The syllabus lists Concept of recursion, Recursive methods, Base case and Tower of Hanoi.

How many questions on Recursion are in ISC Class 12 Computer Science past papers?

Prashnika has 31 questions on Recursion, from papers of 2017-2026 (board, specimen, improvement and practice papers together).

What kinds of questions are asked on Recursion?

By kind: Case based (9), Output (5), Short answer (5) and Program (5).

Questions on other pages on Recursion