sizeof
is a C keyword. It returns the size in a type named size_t
. However, size_t
is not a keyword, but is
The simple reason is because it is not a fundamental type. If you look up the C standard you will find that fundamental types include int
, char
etc but not size_t
. Why so? As others have already pointed out, size_t
is an implementation specific type (i.e. a type capable of holding the size in number of "C bytes" of any object).
On the other hand, sizeof
is an (unary) operator. All operators are keywords.