void fun2(int& a) { a = 5; } int main() { int b = 10; fun2(b); // now b = 5; return 0; }
void fun(int *a) { *a = 10; }