[Solved] passing pointers and reference/address of variables in functions

[ad_1]

The ampersand (&) in a declaration declares a reference type, not a pointer.

The ampersand (&) in an expression is the address of operator, which yields a pointer.

Just because the same token is used in the language for two different things does not mean they are related things. Unfortunately, especially for learners.

0

[ad_2]

solved passing pointers and reference/address of variables in functions