/* indirection1.cpp illustrates indirection and pointer variables.

   Output: addresses of memory locations and the integers
           stored there
------------------------------------------------------------------*/

#include <iostream.h>

int main()
{
  int i = 11,
      j = 22,
      k = 33;

  int * iPtr = &i,
      * jPtr = &j,
      * kPtr = &k;

  cout << "\nAt address " << (void*)iPtr
       << ", the value " << *iPtr << " is stored.\n"
       << "\nAt address " << (void*)jPtr
       << ", the value " << *jPtr << " is stored.\n"
       << "\nAt address " << (void*)kPtr
       << ", the value " << *kPtr << " is stored.\n";
}

