// File: ref4.C // // using references #include int& max(int &a, int &b) { // returns a reference if (a > b) return a ; return b ; } main() { int x = 3, y = 17 ; cout << "x = " << x << ", y = " << y << "\n" ; max(x,y) = 2 ; cout << "x = " << x << ", y = " << y << "\n" ; max(x,y) = 1 ; cout << "x = " << x << ", y = " << y << "\n" ; }