Find the output of the following program for n=5

		
					

Loading

โœช Choose the correct option.

Find the output of the following program for n=5

int foo(int n) {
if(n == 0)
return 1;
else {
int sum = 0;
for(int i=foo(n-1); i sum += foo(i);
}
return sum;
}

A. 9
B. 4
C. 1
D. 0