C语言结构体输入问题,无法实现输入

程序运行时输入name后就直接结束了

#include<stdio.h>
#include<string.h>
int main()
{
    struct DateType
    {
        int year;
        int month;
        int day;
    }birthday;
    struct StudentType
    {
        int num;
        char *name;
        char sex[3];
        struct DateType birthday;
        float score;
    }boy,girl;
    printf("Please input the name of the boy\n");
    gets(boy.name);
    printf("Please input the sex of the boy\n");
    gets(boy.sex);
    printf("Please input the score of the boy\n");
    scanf("%.2f",boy.score);
    printf("%s\n%s\n%f\n",boy.name,boy.sex,boy.score);
    

name是个指针,不是数组
它只能指向一个数组,它自己本身不是数组
你没给它分配内存空间

你的name都没有空间存储,只是一个指针