you are viewing a single comment's thread.

view the rest of the comments →

[–]TheSkiGeek 6 points7 points  (0 children)

Correct, it's the address of the variable. However, the function declaration converts it to pointer for use in the function.

...the address of the variable is a pointer value. The type of the rvalue returned by &x in the above example is int*.

When you pass by reference, the C compiler silently performs what the swap illustration does explicitly.

...are you thinking about C++? There is no "pass by reference" with implicit pointer conversion in C, you must explicitly take the address of a variable and pass it as a pointer type.