/* Program 2: Practice using procedures and parameters in C */

#include <stdio.h>

/* Example procedure demonstrating passing pointers */
void
pointersFunctionTwo (int * pa, int * pb) 
{
  printf ("pointersFunctionTwo before :  pa = %p; pb = %p\n", pa, pb);

  *pa = *pb;
  *pb = 6;
  
  printf ("pointersFunctionTwo after  :  pa = %p; pb = %p\n", pa, pb);  
} // pointersFunctionTwo


/* main procedure to call other function and demonstrate values
   before and after 
*/
int
main (void) 
{  
  int x = 3;
  int y = 4;
  
  printf ("practice program 2\n");
  printf ("main before :  x = %d; y = %d\n", x, y);
  
  pointersFunctionTwo (&x, &y);
  
  printf ("main after  :  x = %d; y = %d\n", x, y);
  return 0;
} // main
