#include <stdio.h>
int main() {
int a = 10, b = 20;
int *p;
p = &a;
printf("p has the current value of %p\n", p);
p = &b;
printf("p now has the value of %p\n", p);
p = (int*)1000;
printf("p is now pointing to the address %p", p);
return 0;
}
To embed this program on your website, copy the following code and paste it into your website's HTML: