Suppose there is a variable a and a pointer p which points to address of a.

int a;
int *p=&a;

Now since I have a pointer pointing to the location of the variable, I know the exact memory location (or the chunk of memory).

My questions are:

  1. Given an address, can we find which variable is using them? (I don't think this is possible).
  2. Given an address, can we atleast find how big is the chunk of memory to which that memory address belongs. (I know this is stupid but still).
Edit
Report