What is Pointer?
A variable whose value is the memory address of a variable, an array element, a function or other object. In C it is declared as in int *p; &x yields the address of x, and *p reads or writes the object p points to. Adding an integer to a pointer advances it in units of the size of the pointed-to type. In most expressions an array name is converted to a pointer to its first element, so a[i] means the same as *(a + i). A pointer value that points nowhere is called a null pointer.
Japanese name: ポインタ
Pointer appears in 26 practice questions across 8 topics, including C Programming Basics, Data Structures and Algorithms, ISA & Assembly.
Field: C Programming Basics
FAQ
How large is a pointer?
In many 64-bit environments it is 8 bytes, and on 32-bit microcontrollers 4 bytes. Data pointers generally have the same size whether they point to char or to double. A pointer is not necessarily the same size as an int, so uintptr_t from stdint.h is used when an address must be stored in an integer.
What is the difference between const char *p and char *const p?
const char *p is a "pointer to const char": the characters cannot be modified through p, but p itself can be changed to point elsewhere. char *const p is a "const pointer": p cannot be changed, but what it points to can be modified. Read it as: const to the left of * fixes what is pointed to, and const to the right fixes the pointer itself.