/* Practice using procedures and parameters in C
   Program 3
*/

#include <stdio.h>

void prA (int *r, int *s) 
{  printf ("prA 1 :  r =%2d;*s =%2d\n", r, *s);

   *r = 5;
   *s = 6;

   printf ("prA 2 :  r =%2d;*s =%2d\n", r, *s);
}


void prB (int a, int *b) 
{  printf ("prB 1 :  a =%2d;*b =%2d\n", a, *b);

   prA (a, b);

   printf ("prB 2 :  a =%2d;*b =%2d\n", a, *b);
}


int main (void) 
{  int x = 3;
   int y = 4;

   printf ("practice program 1\n");
   printf ("main 1:  x =%2d; y =%2d\n", x, y);

   prB (x, &y);

   printf ("main 2:  x =%2d; y =%2d\n", x, y);
   return 0;
}
