Quick Test 16 extra: Recursive Programming

Consider the following program:

#include <stdio.h>
#include <string.h>

int func(char *p)
{
  int c;

  c = 0;
  if (*p == '\0')
    return(0);
  else
   { 
     p++;
     return(1 + func(p));
   }
}

void main()
{
  char a[20];

  strcpy(a, "Ola");
  printf("%d", func(a));
}

1. What is the output of the program?

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