In C++ (any version), the underlying type of an enumeration is int by default, unless every enumerator value cannot be represented as an int. In this case, an implementation-defined type is used (one large enough to represent every enumerator value). Note that the size of int depends on your machine. It might be 16 bits, but is probably 32 bits (even on 64-bit machines). Ultimately, it is decided by the compiler.
Since C++11, you can specify the underlying type when declaring the enumeration, using the following form :
enum name : underlying_type { ... }; // For example enum MySmallEnum : char { ... };
Source : cppreference.com
In C, it seems like it obeys the same rule as in C++ (before C++11).
enum foo : uint8_t {})enumis a signed integer by default.enumis the smallestsigned intthat can contain the values.