警告如下:
test1.c:7:12: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘int *’ [-Wformat=]
printf("%x %d",p,b);
#include
int main()
{
int a=100,b=200;
int *p;
p=&a;
printf("%x %d",p,b);
//printf("\n%d %d",&a,&b);
return 0;
}
printf("%x %d",(unsigned int)p,b);
printf("%x %d\n",*p,b);