You may need to handle very large numbers in the C language. An unsigned number of 32 bits cannot exceed a particular value. In order to handle larger integers, a separate data type for handling 64 bit integers can be used in the C programming language. The long long data type can handle large integers by allowing the compiler to store the number in two registers instead of one. To print a long long data type, the formatting for display is different from other data types. The long long data type makes handling 64 bit integers easy.
In C language, an unsigned number over 32 bits cannot exceed the value of 4,294,967,295.
You may find you are required to handle larger numbers and for this you need these numbers to be coded in 64-bit.
//Assign the value in a 4294967296 unsigned long long a= 4294967296ULL; //Show the value printf ( "% llu", a);
//Assign the value in a 4294967296 long long a= 4294967296LL; // Show the value printf ( "% lld", a);
Your compiler will prompt you that this number is too large for the "long" type. This concept is directly related to the architecture of 32-bit processors. A 32-bit processor is limited and your default compiler will try to fit the numbers in one registry. But with a suffix such as LL and ULL, your compiler will store your number on 2 registers, i.e. in 64-bit, therefore allowing for considerably larger numbers.
Image: © Everypixel