I know that pointers contain the addresses of variables, for example:
int c = 5;
int *p;
p = &c;
printf("%d",*p); // Outputs 5.
But what if I want to send an address to a function:
void function (int *p)
{
p++;
}
int c;
function (&c);
When function is called, the value of &c
is assigned to int *p
. I guess that the exact instruction is: *p = &c;
, but I don't understand what this means.