I like to initialize my variables to some \"dummy\" value and have started to use int64_t
and uint64_t
. So far, it looks like there are at least th
According to the ANSI C standard, the suffix for a long long int
and unsigned long long int
is LL
and ULL
respectively:
octal or hexadecimal suffixed by ll or LL long long int, unsigned long long int decimal, octal, or hexadecimal suffixed by both u or U, and ll or LL unsigned long long int
If you know that int64_t
is defined as:
typedef signed long long int int64_t
Then method two is most definitely the correct one:
int64_t method_two = 0LL;
uint64_t method_two = 0ULL;
Edit:
Keeping in mind the portability issues, and the fact that it's not guaranteed to be defined as long long
, then it would be better to use the third method:
INT64_C()
UINT64_C()