#include <stdio.h>
int main(void)
{
int *ptr;
printf("The Hex value of ptr is 0x%x",ptr);
printf("The pointer value of ptr is %p",ptr);
}
出力が少し違うので理由がわかりません
The Hex value of ptr is 0x24a77950
The pointer value of ptr is 0x7fff24a77950
ptrの値が16進整数であることを示していますが、16進出力には部分がありません7fff
。
これはprintfフォーマットの問題ですか、それとも他の問題ですか?