Last active
May 11, 2018 08:06
-
-
Save h-hirai/253bf06a65eb142dfc0fee0d14d26783 to your computer and use it in GitHub Desktop.
I didn't know inttypes.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdint.h> | |
#include <inttypes.h> | |
int main() { | |
uint8_t u8 = UINT8_MAX; | |
uint16_t u16 = UINT16_MAX; | |
uint32_t u32 = UINT32_MAX; | |
uint64_t u64 = UINT64_MAX; | |
printf("%" PRIu8 "\n", u8); | |
printf("%" PRIu16 "\n", u16); | |
printf("%" PRIu32 "\n", u32); | |
printf("%" PRIu64 "\n", u64); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment