Home » C++ Programming » References

Functions can be declared to return a reference type. There are reasons to make such a declaration/Which of the following reasons are correct? The information being returned is a large enough object that returning a reference is more efficient than returning a copy. The type of the function must be a R-value.

Correct Answer: Both 1 and 2 are correct.

← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion