// A test of parameter passing modes

// Compile with g++ -o testinout testinout.adb

#include <iostream>
using namespace std;

void test(int &x, int &y)
{
    x++;
    y++;
    cout << y <<  endl;
    return;
}

int main()
{
   int i = 0;

   // What happens to i?
   test(i, i);

   cout << i <<  endl;
}
// Output:
// 2
// 2