[prev] 46 [next]

Memory (cont)

Example:

int k;
int m;

printf("address of k is %p\n", &k);
printf("address of m is %p\n", &m);

address of k is BFFFFB80           
address of m is BFFFFB84

This means that

  • k occupies the four bytes from BFFFFB80 to BFFFFB83
  • m occupies the four bytes from BFFFFB84 to BFFFFB87
Note the use of %p as placeholder for an address ("pointer" value)