#include <stdio.h>

main()
{
  int i, array[20], *array_p;

  array_p=array;

  for (i=0; i<20; i++)
    {
      array[i] = i*i;
    }

  /* Using a pointer for the same effect. */
  for (i=0; i<20; i++)
    {
      *array_p++ = i*i;
    }

  /* Make sure not to leave the pointer where it stopped! 
     reset it before reusing it. */
  array_p=array;

  for (i=0; i<20; i++)
    {
      (void) printf("%d\n", *array_p++);
    }
  
  return 0;
}

