Question: #include using namespace std; void fn(int a, int b) { a = 10; b = 20; } int main() { int nValue1 = 1; int

#include

using namespace std;

void fn(int a, int b)

{

a = 10;

b = 20;

}

int main()

{

int nValue1 = 1;

int nValue2 = 2;

fn(nValue1, nValue2);

cout << " nValue1 = " << nValue1 << endl;

cout << " nValue2 = " << nValue2 << endl;

return 0;

}

In the fn function above, the arguments are passed by:

a.

memory location

b.

reference

c.

value

d.

pointer

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!