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)?
- A.
5 5 5 5 5
- B.
1 1 1 1 1
- C.
5 4 3 2 1
- D.
1 2 3 4 5
Attempted by 115 students.
Sign up free to check your answer
Sign up freeLoading lesson…

