Skip to content

Instantly share code, notes, and snippets.

@pazdera
Created February 15, 2012 21:09
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 pazdera/1839022 to your computer and use it in GitHub Desktop.
Save pazdera/1839022 to your computer and use it in GitHub Desktop.
Size of some integer types
/* 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