# Pointer

> A value that points to where other data is kept.

**Field:** Software Development  
**Category:** Compilers & Runtimes  
**Also known as:** Pointers, Memory Address, Null Pointer

## Think of it like

Think of it like a note with a house address on it. The note is not the house, but it tells you where to go.

## Definition

A pointer is a value that holds the memory address of another value. It does not hold the data itself. It says where the data lives. Reading the data it points at is called following the pointer. Pointers let many parts of a program share one big piece of data without copying it. C and C++ use them openly, while most other languages use them quietly under the hood.

## Example

Emma stores 9 in a variable called age. A pointer p holds the address of age. Reading *p gives back 9.

## Example code

```c
int age = 9;
int *p = &age;      // p holds the address of age
printf("%d\n", *p); // prints 9
```

The pointer p does not hold 9. It holds where 9 is kept.

## Why it matters

Pointers are how programs pass big data around cheaply. They are also behind many crashes when they point at nothing.

## Common mistake

Following a pointer that is null or points at freed memory. In C that crashes the program or reads garbage.

## Three principles

- **An address.** Not the data itself.
- **Share, do not copy.** Many parts, one piece of data.
- **Check before use.** Null pointers crash.

## Related terms

- [Heap Memory](https://learn.benibix.com/term/development/heap-memory)
- [Memory Management](https://learn.benibix.com/term/development/memory-management)
- [Variable](https://learn.benibix.com/term/development/variable)
- [Runtime Error](https://learn.benibix.com/term/development/runtime-error)
- [Memory Safety](https://learn.benibix.com/term/development/memory-safety)

---

Source: https://learn.benibix.com/term/development/pointer
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
