Created
April 10, 2015 08:38
-
-
Save eienf/5e5c6f5772a017f746aa to your computer and use it in GitHub Desktop.
printf format string for NSInteger
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
#import <Foundation/Foundation.h> | |
int main(int argc, const char * argv[]) { | |
@autoreleasepool { | |
NSInteger i = 101; | |
NSLog(@"NSInteger %lu",sizeof(NSInteger)); | |
NSLog(@"long %lu",sizeof(long)); | |
NSLog(@"int %lu",sizeof(int)); | |
NSLog(@"%ld",(long)i); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment