Answer:
"Passed by reference" is the correct answer for the above question.
Step-by-step explanation:
- When the method takes the value as an argument then that value is assigned to a different variable and the method can not change the value of that variable which is passed.
- For example, if the fun function is called by the main function and the 'i' variable is assigned in the main function and passed as an argument of the fun function but the fun function has a 'j' variable which stores the value of 'i' variable. So the fun function can not able to change the value of the 'i' variable.
- But if the reference of 'i' variable means the address of 'i' variable is passed as the argument for the fun function, then the fun function j variable will hold the address of 'i' variable, and when the fun function changes the value which is stored on the value of j variable. Then he can able to change the value of the 'i' variable.
- Hence the function can change the value of the argument variable when it is passed by the reference.