the example is wrong, the right source is as follows:
#include
void foo(int *bar) {
*bar = 5;
}
int main ()
{
int bar = 7;
foo(&bar);
return 0;
}
Before the call of the function foo the value of bar is 7, but after the call the value became 5. You can add printf to see the value of the variable before and after the call.