Of course, a function can be called several times, with different arguments. What does the following write to the monitor?
#include <stdio.h> void aFunction( int *p ) { *p = 99; } void main ( void ) { int a = 44, b = 77 ; printf("a=%d b=%d\n", a, b ) ; aFunction( &a ) ; printf("a=%d b=%d\n", a, b ) ; aFunction( &b ) ; printf("a=%d b=%d\n", a, b ) ; }
In the first call, the parameter of
aFunction()
points to a
.
In the second call, it points to b
.