Hello guys, I am utterly confused about functions. Neither, my professor or the text book did a good job of explaining the exact structure and happenings of function paramaters. On a recent test I had a pece of code that looked like the one I posted below this. I got the question wrong and when I compiled it at home the value of the final variables was a=7, b=1, c=8.
Could someone please explain to me how this works, and maybe a method of tracing the variables?
thanks a bunch,
using namespace std;
void c1(int b, int a)
void c2(int b, int& a)
void c3(int c, int& b)
cout << "the value of the variables is: ";
cout << a << " and " << b << " and " << c <<endl;