// ~cs35/ref_2.cpp

#include "CS35lib.h"

void echo_1 (int j)
{
	cout << endl;
	cout <<"In echo 1, j = "<<j<<endl;
	cout <<"address of j = "<<&j<<endl;
	return;
}

void echo_2 (int& k)
{
	cout << endl;
	cout <<"In echo 2, k = "<<k<<endl;
	cout <<"address of k = "<<&k<<endl;
}

int main ()
{
	int i;
	cout <<"Enter an integer: ";
	cin  >> i;
	
	cout <<"i = "<<i<<endl;
	cout <<"address of i = "<<&i<<endl;
	echo_1(i);
	echo_2(i);
	
	return 0;
}

/*
bash-2.05$ ./a.out
Enter an integer: 6
i = 6
address of i = 0xbfbffb98

In echo 1, j = 6
address of j = 0xbfbffb74

In echo 2, k = 6
address of k = 0xbfbffb98

bash-2.05$ ./a.out
Enter an integer: 7
i = 7
address of i = 0xbfbffb98

In echo 1, j = 7
address of j = 0xbfbffb74

In echo 2, k = 7
address of k = 0xbfbffb98
bash-2.05$
*/	
