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 a pointer(memory address) to the variable p into the function f. In other words you are passing a pointer not a reference.