 // hexInitials.cc
// P. Conrad for CISC181 03/06/06
// illustrate various ways of looking at memory

#include <iostream>
using namespace std;

int main(void)
{
  cout << "Output from hexInitials.cc" << endl;

  short int x = 0;
  short int theLetters = 0x4543;// 16 bits - 2 bytes
  short int y = 0;

  cout << "theLetters=" << theLetters << endl;

  cout << "in hex theLetters=" << hex << theLetters << endl;

  char * initPtr;
  
  initPtr = (char *)(&theLetters);

  cout << "initPtr = " << initPtr << endl;

  cout << "Output from hexInitials.cc" << endl;

  return 0;
}

