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 - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -