magicnumbers

← home

-1

Universal error/EOF sentinel

category
sentinel
normalized
-1
confirmed
2026-05-24
lookups
1
source
https://en.wikipedia.org/wiki/Sentinel_value

The most common in-band sentinel: returned by C functions for failure (read, write, open), by getchar/fgetc as EOF, and used as a "not found" index in countless APIs. As an unsigned value it becomes all-ones (0xFFFFFFFF).

Similar magic numbers

valuenamecategory
127.0.0.1 IPv4 loopback address network
1F 8B gzip archive file-signature
1A 02 LH archive (old vers.-type 1) file-signature
10 00 00 00 Easy CD Creator 5 Layout file file-signature
1A 03 LH archive (old vers.-type 2) file-signature