tags:

views:

152

answers:

2

are pointers of integer or unsigned datatype?

+13  A: 

No. They're pointers, whose size is system-dependent and whose only compatible type is void*.

Ignacio Vazquez-Abrams
Another compatible type is `char*`.
MSalters
Function pointers are not compatible to `void*`.
Secure
There has to be a compatible integer type, although which one is implementation-defined, such that you can convert a data pointer to it and back again and have the same pointer.
David Thornley
MSalters : `char *` as a generic pointer is deprecated usage isn't it?
Noufal Ibrahim
David : I think it's `int_ptr` which should be available on all platforms abstracting away the platform specific details.
Noufal Ibrahim
+1  A: 

Pointers are of pointer type. If you're asking about how pointer values are represented in memory, that really depends on the platform. They may be simple integral values (as in a flat memory model), or they may be structured values like a page number and an offset (for a segmented model), or they may be something else entirely.

John Bode