C语言结构体
#include<stdio.h>
#include<string.h>
struct day{
int year;
int month;
int data;
};
struct Node{
char name[20];
char sex[10];
struct day birthday;
char address[100];
};
int main(void)
{
struct Node node1={"wangchun","man",{2003,2,18},"China"};
printf("姓名:%s,性别:%s,生日:%d,住址:%s",node1.name,node1.sex,node1.birthday,node1.address);
}
就是我在打印这个birthday的时候并不会报错但是会打印出来一些不相关的字符,不明白是怎么回事