A reference is the address at which a variable is located in memory. A pointer is used to store this reference.
This example code would output "5".
The obvious advantage of passing variables by reference, rather than by value, is that only one word of data is passed, rather than a, possibly long, piece of data.
Code:
int a = 5; /* store 5 in int a */
int *ptra = &a; /* store reference to a in pointer to int ptra
int b = *ptra; /* dereference pointer a, store in int b */
printf("%d", b);
The obvious advantage of passing variables by reference, rather than by value, is that only one word of data is passed, rather than a, possibly long, piece of data.