Skip to content

Instantly share code, notes, and snippets.

@Birch-san
Created November 20, 2018 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Birch-san/d21f4ae40be9eec598ec3fdd47b0c3c7 to your computer and use it in GitHub Desktop.
Save Birch-san/d21f4ae40be9eec598ec3fdd47b0c3c7 to your computer and use it in GitHub Desktop.
Printing 64-bit unsigned integer as hexadecimal
#include <stdio.h>
#include <inttypes.h>
int main(int argc, char** argv) {
uint64_t val = (1ULL<<29) -1ULL;
printf("0x%" PRIx64 "\n", val);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment