//--------------------------------------------------------------------
// params.cpp
//--------------------------------------------------------------------

#include <iostream.h>
void paramFun ( int &x, int &y, int z ); // x and y are reference parameters void main() { int a = 1, b = 3, c = 4;
cout << "In main(), before call to paramFun()" << endl; cout << "a:" << a << " b:" << b << " c:" << c; cout << endl << endl; paramFun(a,b,c); cout << "In main(), after call to paramFun()" << endl; cout << "a:" << a << " b:" << b << " c:" << c; cout << endl << endl; }
void paramFun ( int &x, int &y, int z ) { x++; y += 2; z *= 3; cout << "Inside paramFun()" << endl; cout << "x:" << x << " y:" << y << " z:" << z; cout << endl << endl; }