Is Pointer a Data Type?

Is Pointer a Data Type?

A pointer is not a data type, it's just an integer (in C).

Why pointer is a data type?

Pointers to any datatype either it may be of char/int/float/double/... are unsigned integers only. Reason: Since a pointer stores the address, which is a location in computer memory, it's always positive,can't be negative.

Is pointer a data type or variable?

Pointers are simply a variable that hold an address so one could argue that a pointer is a data type, but it is not defined as a data type (per "The C Programming Language".

Marcus Vance
Author

Marcus Vance

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.