// Using pointer with matrices
#include <iostream>
using namespace std;

int main ()
{
  int A[5];
  int i;
  int *ptr;
  
  for (i=0; i<5; i++)
       A[i] = 2*i+1;

  for (i=0; i<5; i++)
  {
  	cout << i << ". Element =  " << A[i];
 	cout << " and its Address " << &A[i] <<endl;
  }

  ptr = A;

  cout << endl << endl;

  for (i=0; i<5; i++)
  {
  	cout << i << ". Element =  " << *ptr;
 	cout << " and its Address " << ptr <<endl;
     ptr++;
  }

  cout << endl << endl; 

  return 0;
}

