Prashant Mahajan said:
Yes all the pointers are of same size .
This is often true on many systems, but it absolutely is not
guaranteed by the standard. There are good reasons why void* and
char* pointers might be bigger than int* pointers on some
architectures; similarly function pointers might be represented
differently than object pointers.
"Internally" they all are
actully of type unsigned int , though u can specify them as what ever
datatype . What actully is a pointer , just a way to access the memory
address directly which obviuosly is of type unsigned int.
No. As far as the language in concerned, pointers and integers are
distinct types, though conversions between them are allowed in some
limited circumstances. It is not at all "obvious" that a memory
address is of type unsigned int.
I've worked on several systems on which unsigned int is 32 bits and
pointers are 64 bits (and I expect such systems to become more common
over time).
C99 defines (in <stdint.h>) types intptr_t and uintptr_t that are big
enough to hold object pointer values. It's important to note that
these types are optional, that they aren't necessarily the same size
as an object pointer, and that they can't necessarily hold function
pointer values.
[snip]
Prashant, may I ask where you got your information?