int
if the argument is int
and return a
float
if the argument is float
. See:
par
, the function does not usually receive the full
information about par
. In particular, it only receives the
value that is stored in variable par
, but no information
about where the variable par
is actually located in memory.
As a result, the function can use, but not modify the value of
par
.
However, in C++ we can precede the parameter par
with an &
in the definition of the function, and in its prototypes. In that
case, the function will not receive the value of par
, but the
actual location where par
is stored in memory. This gives
the function full access to par
, and it can now change its
value. The parameter is now passed ``by reference'', instead of ``by
value''.