int i = 3, j = 3;
initialize ( i );
reset ( &j );
printf ( "%d, %d", i, j );
This will print 3, 5, since we have passed a pointer to j
into the function, the value pointed at is changed by the
reset - note that the invocation reset (j)will cause
all sorts of problems, since the parameter j isn't a
pointer.
*
When would j be a pointer? intj[10]; then reset (j);is the same as reset ( &j[0] );
thus the parameter j is a pointer. HOWEVER, the corresponding formal parameter would still be void reset ( int* y );