Created
December 11, 2019 06:00
-
-
Save kost/3a04f949eb803ec6144c83ecb302bfc5 to your computer and use it in GitHub Desktop.
Test sizes of primitives on different archs
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> | |
main() | |
{ | |
fprintf(stdout, "size of char: %d\n", sizeof(char)); | |
fprintf(stdout, "size of short: %d\n", sizeof(short)); | |
fprintf(stdout, "size of int: %d\n", sizeof(int)); | |
fprintf(stdout, "size of char_p: %d\n", sizeof(char *)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment