Here is some code.
long long bitmap2 = 1; printf("%d\n", bitmap2 & 1);
The output is 0, but I am expecting 1. How can I fix this? (I have tried 1LL instead of 1 and uint64_t instead of long long; both gave the same answer of 0.)
What you're currently seeing is undefined behaviour; you need to ensure that the format specifier and the argument match. So use one of the following:
See e.g. http://en.cppreference.com/w/c/io/fprintf for complete documentation for
However, most compilers should warn you if there's a mismatch between the
I think you should use