标签:io ar sp bs ef amp nbsp type return
#include <stdio.h>
int main()
{
typedef struct date{
int year;
int mouth;
int day;
}Date;
typedef struct student{
int age;
Date birthday;
Date inday;
}Student;
Student stu ={23,{1991,1,1},{2011,1,1}};
Student *p;
p = &stu;
printf("%d,%d,%d\n",stu.age,stu.birthday.mouth,stu.inday.day);
printf("%d,%d,%d\n",(*p).birthday.year,(*p).birthday.mouth,(*p).birthday.day);
printf("%d,%d,%d\n",p->birthday.year,p->birthday.mouth,p->birthday.day);
return 0;
}
标签:io ar sp bs ef amp nbsp type return
原文地址:http://www.cnblogs.com/slios/p/4131822.html