#include <stdio.h>
int main(void) {
  short int *x;    /* x is a pointer to a variable of type int */
  short int a = 2;

  printf(" sizeof(a) = %d\n",sizeof(a));
  printf(" sizeof(x) = %d\n",sizeof(x));

  x = &a;    /* the address of a is assigned to x */
             /* x points now to where a is in memory */

  *x = *x+1; /* increment the variable that x points */
             /* to, i.e. the variable a */
  printf(" a = %d\n",  a);
  printf("*x = %d\n", *x);
  printf(" x = %p\n",  x);    /*note pointer format specification*/
  printf("&a = %p\n", &a);
  printf("&x = %p\n", &x);    

  return 0;
}

