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
Get step-by-step solutions from verified subject matter experts
