I don't understand ??? about void *

Hello,
Code:
struct Exp_ {
   struct Exp_ *a;
   struct Exp_ *b;
} Exp

int main(void) {
   Exp *n;
   init_exp(n, a, b);

   printf("line 1 : %p %p\n", &(n->a), &(n->b));

   void **g;
   g = n;

   printf("line 2 : %p %p\n", g, sizeof(void *), g + sizeof(void *));

   return 0
}
result :

Code:
line 1 : 0x28202060 0x28202064
line 2 : 0x28202060 4 0x28202070

I don't understand, why g + sizeof(void *) = 0x28202070 and not 0x28202064

60 + 4 = 64 !!!!

What is it ? Thanks
 
void * is pointer, sizeof(void *) is size of pointer (4B on 32bit arch)
&(n->a) is memory address of a element in n structure
 
Back
Top