Created
July 16, 2019 08:30
-
-
Save surinoel/e6b7cfff34924c75aff47f96447a43e5 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(void) { | |
int a = 0x01020304; | |
char *p; | |
p = (char *)&a; | |
for(int i=0; i<4; i++) { | |
printf("0x%02x\n", *(p + i)); | |
} | |
return 0; | |
} | |
#if 0 | |
0x04 | |
0x03 | |
0x02 | |
0x01 | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment