RiruKira's blog

By RiruKira, history, 5 years ago, In English

Hi everyone, I'm trying to fill up a table of 10 students as example, how can I do it?

I know just how to make the typedef structure, can any one lend me a help? Thanks !

#define MAX 20

typedef struct date
{
       int day,month,year;
} T_date;

typedef struct student
{
       char first_name[MAX], last_name[MAX];
        float mark;
        T_date birth_day;
} T_student;
  • Vote: I like it
  • -11
  • Vote: I do not like it

| Write comment?
»
5 years ago, # |
  Vote: I like it +12 Vote: I do not like it
int main() {
    T_student student[10];
    scanf("%s", student[0].first_name);
    student[0].birth_day.day = 1;
}

and so on