How to use long modifier?
We can apply the long modifier to the allowed data types just by adding it as a prefix in the normal variable declaration. For example:
int var; // normal declaration long int var; // long int variable declaration
One thing to note here is that we cannot use the long modifier with any data type of our choice. In C, we can only use long with 3 datatypes which are as follows:
- long int
- long long int
- long double
C Long
In C, the long keyword is a datatype modifier that can be applied to the basic datatypes to increase the range and size of values their variables can store. For example, a long int variable can store integer values that range from -2,147,483,648 to 2,147,483,647 which is significantly greater as compared to the normal int data type, which can store integer values that range from -32,768 to 32,767 in the 16-bit compiler.
Contact Us