#include <stdio.h>
#include <stdlib.h>

typedef struct {
  int num, den;
} Rational;

int global;

void recurse (int n)
{
  int a[4000];
  Rational *rv = (Rational *) malloc (1000 * sizeof (Rational));

  printf ("Address of a is 0x%.8x\n", &a[0]);
  printf ("Address of rv is 0x%.8x\n", rv);

  if (n > 0) recurse (n-1);
}

int main ()
{
  int x = 5;
  Rational *r1 = (Rational *) malloc (sizeof (Rational));

  printf ("Address of x is 0x%.8x\n", &x);
  printf ("Address of global is 0x%.8x\n", &global);
  printf ("Address of main is 0x%.8x\n", main);
  printf ("Address of r1 is 0x%.8x\n", r1);

  recurse (1);
  return 0;
}
  
