debian@debian:~$ cat /tmp/test.c
#include<stdio.h>
int main(void)
{
int m=1;
printf("m=%d\n",&m);
printf("m=%p\n",&m);
}
debian@debian:~$ gcc /tmp/test.c -o /tmp/test.exe
debian@debian:~$ /tmp/test.exe
m=-1078061268
m=0xbfbe172c
debian@debian:~$ python
Python 2.7.3 (default, Jan 2 2013, 16:53:07)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print hex(-1078061268)
-0x4041e8d4
为什么-1078061268
in dec 不等于0xbfbe172c
十六进制?