Quick Test 16 extra: 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 := Exp(n*Ln(x)) + XfuncN(x, n-1);
      (* remember a^b = Exp(b*Ln(a)) *)
end;

begin
  WriteLn(XfuncN(2.0, 2):0:1);
end.

1. What is the output of the program?

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