Created
February 15, 2012 21:09
-
-
Save pazdera/1839022 to your computer and use it in GitHub Desktop.
Size of some integer types
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
/* Integer types -- sizes */ | |
#include <stdio.h> | |
#include <stdint.h> | |
int main(void) | |
{ | |
printf("int bytes: %d\n", sizeof(int)); | |
printf("uint32_t bytes: %d\n", sizeof(uint32_t)); | |
printf("long bytes: %d\n", sizeof(long)); | |
printf("long long bytes: %d\n", sizeof(long long)); | |
printf("uint64_t bytes: %d\n", sizeof(uint64_t)); | |
uint64_t bigass_number = 0xFF00FF00FF00FF00LLU; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment