Skip to content

Instantly share code, notes, and snippets.

@patrickt
Created May 20, 2009 21:43
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 patrickt/115109 to your computer and use it in GitHub Desktop.
Save patrickt/115109 to your computer and use it in GitHub Desktop.
int
main(int argc, char * const argv[])
{
printf("void* is %d bits wide\n", sizeof(void*) * 8);
printf("int is %d bits wide\n", sizeof(int) * 8);
printf("long is %d bits wide\n", sizeof(long) * 8);
printf("long long is %d bits wide\n", sizeof(long long) * 8);
printf("float is %d bits wide\n", sizeof(float) * 8);
printf("double is %d bits wide\n", sizeof(double) * 8);
printf("long double is %d bits wide\n", sizeof(long double) * 8);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment