#include <stdio.h>
int main(void)
{
int a=10;
int *p = &a;
*p = 89;
printf("變量值a=%d a=%d\n", a,*p);//0x7fff8af18554
printf("指針地址p=%p p=%p\n",p,&a);//0x7fff8af18554
printf("指針地址p=%#lx p=%#lx\n",p,&a);//0x7fff8af18554
return 0;
}
#include <stdio.h>
int main(void)
{
int a=10;
int *p = &a;
*p = 89;
printf("變量值a=%d a=%d\n", a,*p);//0x7fff8af18554
printf("指針地址p=%p p=%p\n",p,&a);//0x7fff8af18554
printf("指針地址p=%#lx p=%#lx\n",p,&a);//0x7fff8af18554
return 0;
}
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。