Consider the following C program: int f(int n) { if (n <= 1) return 1; n = (n…

Consider the following C program:

int f(int n) {

if (n <= 1) return 1;

n = (n - 1) * (n - 1) - 2 - n * n + 3 * n;

f(n);

printf("%d ", n);

}

What is the output if the initial call is f(6)?

  1. A.

    5 5 5 5 5

  2. B.

    1 1 1 1 1

  3. C.

    5 4 3 2 1

  4. D.

    1 2 3 4 5

Attempted by 115 students.

Sign up free to check your answer

Sign up free

Explore the full course: Isro

Loading lesson…