char数组与int类型数据存储转换

#defind BUF_SIZE 1024

char opmsg[BUF_SIZE];

int---------->char[]

scanf("%d",(int *)opmsg);

 

char[]------->int

int *opmsgint=(int *)opemsg;

printf("this is :%d \n",*opmsgint);

你可能感兴趣的:(C语言)