#include<stdio.h>
main() {
int i=9;
printf("\nAddress of i = %d", &i);
printf("\nAddress of i = %x", &i);
printf("\nAddress of i = %u", &i);
printf("\nAddress of i = %p", &i);
printf("\nValue of i = %d",i);
}
Run Code Online (Sandbox Code Playgroud)
当我使用%p我得到:价值i= 0xbfd08d5c
其他格式%d,%x,%u不工作.