#include ”psrec2.h” |
#include <stdio.h> |
void main(){ |
psrec2 student; |
student.name = (char *)malloc(sizeof(char)*20); |
strcpy(student.name, ”kojima”); |
student.birthday.yy = 1968; |
student.birthday.mm = 4; |
student.birthday.dd = 6; |
printf(”name before call func is %s \n”, student.name); |
printf(”birthday before call func is %d %d %d \n”, |
student.birthday.yy, student.birthday.mm, student.birthday.dd); |
func(student); |
printf(”name after call func is %s \n”, student.name); |
printf(”birthday after call func is %d %d %d \n”, |
student.birthday.yy, student.birthday.mm, student.birthday.dd); |
} |