int main()
{
int a;
typedef struct
{
int i;
int j;
}type1;
typedef type1 type[10]; //Please explain this line ?
typedef struct
{
int l;
type c;
}type2;
type2 x;
x.c[0].i=1; //How can we write this??
x.c[0].j=2;
x.c[2].j=3;
printf("%d",x.c[2].j);
return 0;
}
Run Code Online (Sandbox Code Playgroud)
程序正在成功编译,我正在考虑不要因为
typedef type1 type[10];
Run Code Online (Sandbox Code Playgroud)
请解释这里打字的行为.我所知道的是我们可以在typedef的帮助下定义一个别名.
输出:3