Remember, in C even pointers are passed by value, so by taking the address of a pointer passed to a function you are actually getting the address of a local copy of that pointer. The solution is to pass a pointer to a pointer.
Code:
void reset(int** ptr, int* adr)
{
*ptr = adr;
}
int main(void)
{
int a = 1024, b = 512, *p = 0;
printf("Address of 'a': %x\n", (unsigned)&a);
printf("Value of 'a': %d\n", a);
printf("Address of 'b': %x\n", (unsigned)&b);
printf("Value of 'b': %d\n", b);
puts("reset: p -> a");
reset(&p, &a);
printf("Value of 'p': %x\n", (unsigned)p);
printf("Value of '*p': %d\n", *p);
puts("reset: p -> b");
reset(&p, &b);
printf("Value of 'p': %x\n", (unsigned)p);
printf("Value of '*p': %d\n", *p);
}