Created
March 6, 2012 17:14
-
-
Save davidbalbert/1987568 to your computer and use it in GitHub Desktop.
This file contains hidden or 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> | |
int main(int argc, const char *argv[]) | |
{ | |
printf("sizeof(char) = %lu\n", sizeof(char)); | |
printf("sizeof(short) = %lu\n", sizeof(short)); | |
printf("sizeof(int) = %lu\n", sizeof(int)); | |
printf("sizeof(long) = %lu\n", sizeof(long)); | |
printf("sizeof(long long) = %lu\n", sizeof(long long)); | |
printf("sizeof(float) = %lu\n", sizeof(float)); | |
printf("sizeof(double) = %lu\n", sizeof(double)); | |
printf("sizeof(long double) = %lu\n", sizeof(long double)); | |
printf("sizeof(char *) = %lu\n", sizeof(char *)); | |
printf("sizeof(int *) = %lu\n", sizeof(int *)); | |
return 0; | |
} |
Ha.. nice! sorry for being a smartass then d-:
Hehe. Don't worry about it :).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It was a teaching tool to demonstrate exactly that point :)