Quick Test 16: Recursive Programming

Consider the following program:

PROGRAM CalculateN;
Var a: real;

Function XfuncN(x: real; n: integer): real;
Var c: real;
begin
  c := 0.0;
  if n=0 then
    XfuncN := 1.0
  else
    XfuncN := x*XfuncN(x, n-1);
end;

begin
  WriteLn(XfuncN(3.0, 3):0:1);
end.

1. What is the output of the program?

2. How many copies of the local variable c exists at maximum?