Computer Science, asked by ayushgupta5710, 11 months ago

What is the main advantage of passing arguments by reference

Answers

Answered by lTheDreamCatcherl
4

References provide a way to avoid this penalty. When an argument is passed by reference, a reference is created to the actual argument (which takes minimal time) and no copying of values takes place. This allows us to pass large structs and classes with a minimum performance penalty.

Similar questions