If C does not support passing a variable by reference, why does this work?
#include void f(int *j) { (*j)++; } int main() { int i = 20;
In C, Pass-by-reference is simulated by passing the address of a variable (a pointer) and dereferencing that address within the function to read or write the actual variable. This will be referred to as "C style pass-by-reference."
Source: www-cs-students.stanford.edu