I'm practicing C using structs and pointers, I'm asking to the user to input some info using structs and then using pointers to modify it but I'm having problems when I need to get a string with spaces. I switched all the scanfs for fgets and still getting problems with the output.
#include <stdio.h>
#include <stdlib.h>
#define MAXTSTR 25
int main(int argc, char **argv) {
    
    typedef struct birthday {
        int day, year;
        char month[10];
    } BDATE;
    
    struct employee {
        char name[MAXTSTR];
        int id;
        float salary;
        BDATE bday;
    } emp;
    
    struct employee *ptrEmp = &emp;
    printf("Enter employee name:");
    fgets(emp.name, MAXTSTR, stdin );
    printf("enter id number:");
    scanf(" %d", &emp.id);
    printf("enter salary");
    scanf(" %f", &emp.salary);
    printf("enter birhday:");
    scanf(" %d", &emp.bday.day);
    printf("enter year:");
    scanf(" %d", &emp.bday.year);
    printf("enter month:");
    fgets(emp.bday.month, MAXTSTR, stdin);
    
    printf("\nName: %s \nID: %d \nSalary: %.2f\n", emp.name, emp.id, emp.salary);
    printf("%d %s %d", emp.bday.day, emp.bday.month, emp.bday.year);
    
    printf("\n------------------------------------\n");
    
    printf("Enter employee name:");
    fgets(ptrEmp->name, MAXTSTR, stdin);
    printf("enter id number:");
    scanf(" %d", &ptrEmp->id);
    printf("enter salary");
    scanf(" %f", &ptrEmp->salary);
    printf("enter birhday:");
    scanf(" %d", &ptrEmp->bday.day);
    printf("enter year:");
    scanf(" %d", &ptrEmp->bday.year);
    printf("enter month:");
    scanf(ptrEmp->bday.month, MAXTSTR, stdin);
    
    printf("\nName: %s \nID: %d \nSalary: %.2f\n",
       ptrEmp->name, ptrEmp->id, ptrEmp->salary);
    printf("%d %s %d", ptrEmp->bday.day, ptrEmp->bday.month,
       ptrEmp->bday.year);
    
    return (EXIT_SUCCESS);
}
INPUT and OUTPUT EXAMPLE
Enter employee name:Luis Oliveira
enter id number:01
enter salary1525.25
enter birhday:05
enter year:1991
enter month:
Name: Luis Oliveira
 
ID: 1 
Salary: 1525.25
5 
 1991
------------------------------------
Enter employee name:Patricia Santos
enter id number:02
enter salary16546.46
enter birhday:05
enter year:1946
enter month:Fev
Name: Patricia Santos
 
ID: 2 
Salary: 16546.46
5 
 1946
What I'm doing wrong?
Thank you in advance for your help.
 
     
    