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

#include <stdio.h>

/* Example procedure demonstrating passing values and pointers */
void
pointersFunctionOne (int a, int * pb) 
{
  printf ("pointersFunctionOne before : a = %d; pb = %p\n", a, pb);

  a = 5;
  *pb = 6;
  
  printf ("pointersFunctionOne after  : a = %d; pb = %p\n", a, pb);
} // pointersFunctionOne


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