An alias, an alternative name for an existing variable, is a reference variable. Once a connection with a variable is initialized, either the variable name or the referenced name can be used for the variables themselves.

References vs Pointers

References are commonly mistaken with indicators, but three main differences are RecognizedRecognized -

  • No references to NULL can be found. You always have to assume that a connection is linked to a simple storage device.
  • The reference to an object cannot be transferred to another object when initialized, and Pointers can at any time be pointed to a different object.
  • When created, a reference needs to be initialized. Pointers can always be initialized.

For function argument lists and function return values, references normally are used.