/* 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 = %lu; pb = %lu\n", 
	  (unsigned long)pa, (unsigned long)pb);

  *pa = *pb;
  *pb = 6;
  
  printf ("pointersFunctionTwo after  :  pa = %lu; pb = %lu\n", 
	  (unsigned long)pa, (unsigned long)pb);  
}

/* 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;
}
