Show a formal walkthrough of the program section shown below. Use the line numbers found in the comments, to identify in

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Show a formal walkthrough of the program section shown below. Use the line numbers found in the comments, to identify in

Post by answerhappygod »

Show a formal walkthrough of the program section shown below.
Use the line numbers found in the comments, to identify
instructions as they execute. Show the exact output produced, in a
separate area of your answer.
int main()
{
int a, b;
a
= 10; //Line
1
b
= -5; //Line
2
fun2(a,
b ); //Line
3
cout << "a = " << a << ", b
= " << b <<
endl; //Line 4
return 0;
}
void fun2( int& m,
int n) //Line
f1
{
int j;
j = m
+ n; //Line
f2
n
= 2*m; //Line
f3
m = j
- 3; //Line
f4
cout << "In fun2, m = " <<
m << ", n = " << n << endl; //Line
f5
}
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply