I need to read a text file and store the data in a structure. I have done the the part where you open the file using `FILE *fp = fopen("datafile.txt", "r")` using `fgets(buffer, sizeof(buffer), fp)` to read the data. My file structure is as follows

```
John is enrolled in MATH 1314
Steve is enrolled in MATH 1314

struct course {
   char name[20];
   char department[4];
   int number[4];
};

int main(void)
{
  FILE *fp;
  char* token;
  char* line[50];

  struct course student; 

  fp = fopen("input-hw04b.txt", "r");
  while (fgets(line, sizeof(line), fp) != NULL)
  {
     token = strtok(buffer, " ");
     while (token != NULL)
     {
        /* Add structures here */
        token = strtok(NULL, " ");
     }
  }
}

```

I need to store the following

* John in student.name
* MATH in student.department
* 1314 in student.number

So far this is what I have, I'm stuck on how to put this data into the structure. I pulled in the data from a text file reading it line by line then tokenized it so that I would try and put it into the structure.