A pointer is a variable that
denotes a memory address. When a pointer holds the address of another variable,
we say that it points to the location of that variable in memory or to
the data stored there. In the case of an array or other structured type, a pointer
holds the address of the first element in the structure.
Pointers are typed to
indicate the kind of data stored at the addresses they hold. The
general-purpose Pointer type can represent a pointer to any data, while
more specialized pointer types reference only specific types of data. Pointers
occupy four bytes of memory.
Data types and variables: Overview
一个指针就是一个表示内存地址的变量。当一个指针保存另一个变量的地址时,可以描述为:指针指向变量在内存中的位置(或数据存放的位置)。对于数组或其他结构类型,指针保存的是结构类型中第一个元素的地址。
指针被指定类型是表示特定种类的数据存放在指针保存的地址中。一般的Pointer指针类型可以表示任何数据的指针,而更多特殊指针类型引用仅针对指定的数据类型。指针占用4字节内存。