// b01.cpp : 界说控制台应用程序的进口点。
//
#include “stdafx.h”
int _tmain(int argc, _TCHAR* argv[])
{
int arr1[]={1,2};
char arr2[]={255,255,255,255, 255,255,255,254};
void *p3=arr1;
int *p1=(int*)p3;//这里是指针的强制类型转化,即把全能指针p3抓换成int指针p1
int *p2=(int*)arr2;
*p1=*p2;
printf(“%x”,*p1);
char *p5=arr2;
int a=*((int*)p5); //这里是把指针强制转化后再经过指针把数值传给int变量a
printf(“%x”,a);
return 0;
}