c - Are integer literals considered unsigned? -
if there positive integer literal in code, 50, compiler consider type unsigned int or int?
a decimal integer literal of first type can represented in int, long or long long.
50 of type int.
unsigned literals can specified using u or u suffix. decimal integer literal suffixed u or u of first type can represented in unsigned int, unsigned long or unsigned long long.
50u of type unsigned int.
Comments
Post a Comment