Created
February 11, 2013 22:45
-
-
Save KristianLyng/4758328 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
| $ cat foo.c; gcc foo.c; ./a.out | |
| #include <stdio.h> | |
| main() { | |
| int i = 16777343; | |
| char *a = (unsigned char *)&i; | |
| printf("IP: %d er %hhu.%hhu.%hhu.%hhu.\n",i, a[0], a[1], a[2], a[3]); | |
| } | |
| IP: 16777343 er 127.0.0.1. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment