int b[2][3]={1,2,3,4,5,6};
int (*p)[3]=b;
printf("%d,\n",*(p[0]+1));
2,
#include<stdio.h>
#include<string.h>
//char *strcpy( char *dest, const char *src);
struct student{
int id;
char name[28];
float score;
};
int main(int argc, const char *argv[]){
struct student stu1;
stu1.id =1;
stu1.score =99.2;
//stu1.name="yjh" **错误,数组未初始化不能全体赋值**
strcpy(stu1.name, "yjh");
printf("%d,%s,%.2f\n",stu1.id,stu1.name,stu1.score);
return 0;
}
struct sam{
char a;//1 占用两个
short b;//2 占用2个
char c;//1 占用四个
int d;//4 占用四个
}st;//共占用12