What does the postfix (or suffix) U mean for the following values?
0U
100U
What does the postfix (or suffix) U mean for the following values?
0U
100U
It stands for unsigned.
When you declare a constant, you can also specify its type. Another common example is L, which stands for long. (and you have to put it twice to specify a 64-bit constant).
Example: 1ULL.
It helps in avoiding explicit casts.
Integer constants in C and C++ can optionally have several suffixes:
123u - the value 123 is an unsigned int123l - (that's a lowercase L) 123 is a signed long123L - ditto123uL - unsigned long123LL - a signed long long, a 64 bit or 128 bit value (depending on the environment)123uLL - unsigned long longYou can read more here: https://en.cppreference.com/w/cpp/language/integer_literal