0
有人可以解释为什么下面的代码在第二个printf上产生不同的结果,如果我评论第一个printf行或不在64位?64位ELF产生无法解释的结果
/* gcc -O0 -o test test.c */
#include <stdio.h>
#include <stdlib.h>
int main() {
char a[20] = {0};
char b = 'a';
int count=-1;
// printf("%.16llx %.16llx\n", a, &b);
printf("%x\n", *(a+count));
return 0;
}
我得到的第二个printf结果如下:
- 评论:0
- 注释掉:61
提前感谢!
iansus