An unsigned version of the long long data type. An unsigned long long occupies 8 bytes of memory; it stores an integer from 0 to 2^64-1, which is approximately 1.8×10^19 (18 quintillion, or 18 billion billion).
A synonym for the unsigned long long type is uint64.
Like an unsigned int, an unsigned long long won’t store negative numbers; it is also subject to the same overflow issues as any integral data type.
Here is an example of declaring an unsigned long long variable named c, then giving it value 299,792,458,000,000,000 (see integer constants for an explanation of the “ULL” at the end of the number):
// Speed of light in nanometers per second (approximate).
unsigned long long c = 299792458000000000ULL;
The general syntax for declaring an unsigned long long variable named var, then giving it value val, looks like:
unsigned long long var = val;
License and Attribution
This documentation page was adapted from the Arduino Reference Documentation, which is released under a Creative Commons Attribution-ShareAlike 3.0 License.