What is the datatype of pointer in c?

Viewed 39313

are pointers of integer or unsigned datatype?

7 Answers

I believe pointers itself are data types. This belief of mine came from the book written by Brian Kernighan and Dennis Ritchie 2nd edition from Introduction part stating that -

BCPL and B are "typeless" languages. By contrast, C provides a variety of data types. The fundamental types are characters, and integers and floating point numbers of several sizes. In addition, there is a hierarchy of derived data types created with pointers, arrays, structures, and unions.

Please discuss or share your views.

Reference - c programming language by dennis ritchie

int *p;

data type of *p is pointer. And it points to integer type variable. It stores address in hexadecimal format.

Related