I think you are confused about how the function works. You pass the value of x to it (well, a reference to a intnon-actual value), so ... yes, that works.
By providing a default value for y ( int y=100), you make sure that this function can be called without passing a second argument to it. If called with a single argument, y will be set to 100.
int a=5,b=6;
execute(b);
Inside execute (), the initial value of x is 6, and y is 100.
source
share