Definitions
from Wiktionary, Creative Commons Attribution/Share-Alike License.
- noun An evaluation strategy in which the
arguments to afunction areevaluated first, and apointer to the result is passed to the function.
Etymologies
Sorry, no etymologies found.
Support
Help support Wordnik (and make this page ad-free) by adopting the word call-by-reference.
Examples
-
In call-by-value, argument value is not altered in calling program but if passed using call-by-reference then changes done to the value of argument in the called function also gets reflected in the calling function.
LearnHub Activities 2008
-
In call-by-reference using pointers, we have dereferencing operator (*) in-between data-type and variable name.
LearnHub Activities 2008
-
Call-by-reference using reference variable has neatier code than inside function using call-by-reference using pointers.
LearnHub Activities 2008
-
However, if call-by-reference using pointers is used then you will have (&) in-between data-type and variable name in the calling program.
LearnHub Activities 2008
-
Now, you must be wondering how to decide when to use call-by-reference using pointer and when to use call-by-reference using reference variable.
LearnHub Activities 2008
-
In call-by-reference using reference variable, we have address-of (&) operator in-between data-type and variable name.
LearnHub Activities 2008
-
Now, question is when to use call-by-reference using pointer variable and when by reference variable.
LearnHub Activities 2008
Comments
Log in or sign up to get involved in the conversation. It's quick and easy.