结构中的结构怎么输出
怎么输出结构中的结构啊?大神们帮帮我啊#include<stdio.h>
int main()
{
struct Date
{long int year;
long int month;
long int day;
};
struct Student
{
Date birthday;
long int num;
char name[20];
char sex;
char addr[20];
}a={{1997,11,15},10101,"li lin",'m',"123 beijing road"};
printf("year:%d\nmonth:%d\nday:%d\n%c\nnum:%d\nname%s\nsex:%c\naddr:%s\n",a.birthday,a.num,a.name,a.sex,a.addr);
return 0;
}
printf是错的,应该怎么输出?