what are the advatages of passing arguments by refrence
Answers
Answered by
0
Answer:
Advantages of passing by reference:
References allow a function to change the value of the argument, which is sometimes useful. Otherwise, const references can be used to guarantee the function won’t change the argument.
Because a copy of the argument is not made, pass by reference is fast, even when used with large structs or classes.
References can be used to return multiple values from a function (via out parameters).
References must be initialized, so there’s no worry about null values.
LIKE MY ANSWERS
MARK ME AS BRAINLIEST
HOPE IT HELPS
Similar questions