reference variable in function c++ code example Example: calling by reference c++ void fun(int *a) { *a = 10; }