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

javascript - Unusual behaviour when drawing lots of images onto a large canvas -

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

javascript - Chart.js - setting tooltip z-index -