C++ Passing Pointer to a function

Passing a pointer as an argument instead of a variable then the address of the variable is passed instead of the value. So, the function using the pointer is permanently made at the address of the passed variable. This is call by reference.

Syntax

Example

The following results are:-