I am trying to understand pointers and I can't get one thing. For instance,
//part of code
int *p;
int tab[3];
so now we have variable tab
that contains address of first element of the array. And I want to create a pointer that points on that pointer.
So, I would do this like this way:
p=&tab;
If it would work, p
would be the address of tab
(that means it would point to tab
)
Unfortunately it doesn't work. So how to get to address of the pointer itself?
what is the correct type for address? (addresstype *p
) I want to point of the memory block which contains address of first element of tab
, not on tab
itself.