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;
Because you're passing the value of the pointer to the method and then dereferencing it to get the integer that is pointed to.