// paramPassing1.cc
// P. Conrad CISC181 03/02/06
// transcribed expertly by Hui Wang :)

#include <iostream>
using namespace std;

int foo(int x)
{
  x=4;
  return 2*x;
}

int bar(int *y)
{
  int a;
  a=2*(*y);
  (*y)++;
  return a+(*y);
}

int main(void)
{
  int a, b, c, x, y, z;
  x=3;
  a=foo(7);
  b=bar(&a);
  c=foo(bar(&x));
  cout << "a=" << a << " b=" << b << " c=" << c << endl;
  return 0;
}
