Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Should not matter.
On 32-bit processor, long int is the same as int anyway.
On 16-bit processor, the constant will be 32-bit because it doesn't fit into 16 bits.
I would not blindly trust that. Standard says that int must be at least 16 bits and long int 32 bits. Compilers for microcontrollers do not always comply with standards. The original question is kind of lazy.. true answer on my opinion is that you should know your compiler. If the compiler does not have proper documentation then you should switch compiler.
I always use UL with big numbers.. just in case. It doesn't do any harm, just informs the compiler. And I always use c99 standard types: uint8_t, uint16_t, etc. I never use int, long int etc.. those are obsolete. That is my opinion. For string arrays I still use "char". That is the only variable that I trust the compiler.
If you say
char c;
sizeof(c); /* sizeof returns 1 */
that variable is 1 byte. But, if you say
sizeof('c') /* sizeof returns 2 */
that constant is 2 bytes.