Pointer [HELP]
#include <stdio.h> int main() { int num = 10; int * ptr = NULL; int *pt = # ptr = # printf("Address of num = %x\n", &num); printf("Value of num = %d\n", num); printf("\n"); printf("Address of ptr = %x\n", &ptr); printf("Value of ptr = %x\n", ptr); printf("Value pointed by ptr = %d\n", *ptr); printf("\n"); printf("Address of pt = %x\n", &pt); printf("Value of pt = %x\n", pt); printf("Value pointed by pt = %d\n", *pt); return 0; } what's the difference between storing address of a value to a pointer while declaring pointer and after declaring pointer? After declaring pointer why can't i assign ,like: int *ptr = NULL; *ptr = &num ? what's the difference between say, &ptr, and ptr? Does ptr store an address and value temporary and it's real address &ptr(?) doesn't change?