If I have a program:
#include using namespace std; int TestIntReturn(int &x, int &y) { x = 1000; y = 1000; return x+y;
The return value is stored on the stack and popped off when the function returns. Since it is not being assigned to a variable by the caller, it is just discarded when the stack is popped.