Last active
August 29, 2015 14:12
-
-
Save x5lcfd/f05d11d2f9cf26322cfd to your computer and use it in GitHub Desktop.
A nice trick with symmetric array
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
static char digits[19] = { '9', '8', '7', '6', '5', | |
'4', '3', '2', '1','0', '1', '2', '3', '4', '5', | |
'6', '7', '8', '9' }; | |
static const char* zero = digits + 9; | |
printf( "%c\n", zero[-1] ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
看的太少了,奇技淫巧。