64,639
社区成员
发帖
与我相关
我的任务
分享
#include<iostream>
using namespace std;
int main()
{
int i[2]={1073741824,-1073741824};
int *p1=&i[0];
char *p2=(char*)&i[0];
float *p3=(float*)&i[0];
printf("%d->%d\n",p1,*p1);
printf("%d->%d\n",p2,*p2);
printf("%d->%f\n",p3,*p3);
p1++;
p2++;
p3++;
printf("%d->%d\n",p1,*p1);
printf("%d->%d\n",p2,*p2);
printf("%d->%f\n",p3,*p3);
system("pause");
}