Created
October 11, 2021 04:22
-
-
Save hawaijar/e65bf8e1869d68348be6f3af9374bbde to your computer and use it in GitHub Desktop.
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
#import <Foundation/Foundation.h> | |
int main(int argc, const char * argv[]) { | |
@autoreleasepool { | |
char charData = 'A'; | |
printf("\nSize of variable charData is %lu byte", sizeof(charData)); | |
int intData = 100; | |
printf("\nSize of variable intData is %lu bytes", sizeof(intData)); | |
short shortIntData = 20; | |
printf("\nSize of variable shortIntData is %lu bytes", sizeof(shortIntData)); | |
long int longIntData = 5555555; | |
printf("\nSize of variable longIntData is %lu bytes", sizeof(longIntData)); | |
float floatData = 4.5; | |
printf("\nSize of variable floatData is %lu bytes", sizeof(floatData)); | |
double doubleData = 4.5; | |
printf("\nSize of variable doubleData is %lu bytes", sizeof(doubleData)); | |
printf("\n"); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment