Why scanf must take the address of operator
Because C only has “pass-by-value” parameters, so to pass a ‘variable’ to put a value into, you have to pass its address (or a pointer to the variable).
Because C only has “pass-by-value” parameters, so to pass a ‘variable’ to put a value into, you have to pass its address (or a pointer to the variable).
There’s only one valid function definition, the 1st one you gave: Function Definition 1: void fun (int* p) { p += 1; } Also you probably meant: (*p) += 1;