177k views
3 votes
A function that passes the address of a variable as a parameter is allowed to make changes to the argument through the dereference operator.

User Ggael
by
8.4k points

1 Answer

5 votes

Final answer:

A function that passes the address of a variable as a parameter is called pass by reference, allowing the function to make changes to the argument using the dereference operator.

Step-by-step explanation:

A function that passes the address of a variable as a parameter is called pass by reference. This allows the function to make changes to the argument through the dereference operator. In C++, for example, you can pass a pointer to a variable instead of the actual variable itself. This way, any changes made to the variable inside the function will affect the original variable.

User Arthur Shinkevich
by
7.5k points