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

Popular posts from this blog

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -