Consider the following program Draw a solid box around all a

Consider the following program: Draw a solid box around all actual arguments in the above program. Draw a dashed box around all formal parameters in above program. Underline any prototypes in the above program. What does the above program output?

Solution

#include <iostream>
using namespace std;

int main() {
   // your code goes here
  
int foo(int u,int &v,int w);
int b,y;
b = 1;
y = foo(2*b,b,3*b);
cout << b << y;
  
   return 0;
}

int foo(int x,int &y,int z)
{
y = 2;
return (x+y+z);
}

/*
Actual arguement in above programs are :
b,y;
  
Formal parameters in above program are :
u,v,w,x,y in foo,z;
  
Prototype in above program is :
int foo(int u,int &v,int w);
  
Output of above program is:
27
*/

 Consider the following program: Draw a solid box around all actual arguments in the above program. Draw a dashed box around all formal parameters in above prog

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site