Question: trace void test ( int, int&, int&); void main() { int d = 5; int e = 9; int f = 8; int a =

trace

void test ( int, int&, int&);

void main()

{

int d = 5; int e = 9; int f = 8; int a = 6; int b = 10;

test (d, e, f);

cout << In the main program after the first call ;

cout << the variables are: << setw(4) << e << setw(4) << d << setw(4) << f << endl;

cout << --------------------------------------------------------------------------;

test (a, b, f);

cout << In the main program after the second call ;

cout << the variables are: << setw(4) << a << setw(4) << d << setw(4) << f << endl;

}

void test(int t, int& s, int& x)

{

s = ++t;

s = s / x;

x = s % t;

x = x*2 + t;

cout << Function test Output: << setw(4) << s << setw(4) << t <

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!