回复 7 楼 soulmate1023
我的和你的有点出入
#include<stdio.h>
struct temp_state_data {
unsigned char state[6];
float state_data;};
int main()
{
int i;unsigned char temp='a';
struct temp_state_data data[3],temp_1;
for(i=0;i<6;i++)
data[0].state[i]=temp++;
data[0].state_data=1.0;
for(i=0;i<6;i++)
temp_1.state[i]=data[0].state[i];
temp_1.state_data=data[0].state_data;
data[1]=data[0];
data[2]=temp_1;
printf("the data address is %p\n",data);
printf("the data[0] address is %p\n",data[0]);
printf("the data[1] address is %p\n",data[1]);
printf("the data[2] address is %p\n",data[2]);
printf("the &data address is %p\n",&data);
printf("the &data[0] address is %p\n",&data[0]);
printf("the &data[1] address is %p\n",&data[1]);
printf("the &data[2] address is %p\n",&data[2]);
printf("the data[0].state address is %p\n",data[0].state);
printf("the data[1].state address is %p\n",data[1].state);
printf("the data[2].state address is %p\n",data[2].state);
printf("the &data[0].state address is %p\n",&data[0].state);
printf("the &data[1].state address is %p\n",&data[1].state);
printf("the &data[2].state address is %p\n",&data[2].state);
retrun 0;
}