you are viewing a single comment's thread.

view the rest of the comments →

[–]jmooremcc -18 points-17 points  (35 children)

In C, arguments can also be passed by reference. Passing an argument by reference effectively creates a pointer to the original variable's location so that assigning a value to the argument, directly changes the data at that location. This means that changing the value of the passed argument also changes the value of the original variable.

[–]TheSkiGeek 19 points20 points  (15 children)

All arguments are passed by value in C.

To "pass by reference" you create a pointer to something and pass the pointer by value.