132k views
0 votes
Passing by reference is used if a parameter's data flow is A. one-way, into the function. B. one-way, out of the function. C. two-way, into and out of the function. D. a and b above E. b and c above

1 Answer

5 votes

Passing by reference is used if a parameter's data flow is two-way, into and out of the function.

C. two-way, into and out of the function.

Step-by-step explanation:

If a function in programming language passing the parameter by reference means it only sending the address of parameter to a function. If any value is changed on reference parameter it will changed original value.

If parameter passed by value means it is one way, where value been send to the function.

Whereas by reference means it two-way, in and out of the function. Mostly it called as pointer.

It is available in c , c++, where declare of variable “*” or “&” address off.

User Leona
by
8.0k points

No related questions found