Output bị miss ngày tháng năm khi dùng trên netbean

Output code quản lý sinh viên bị miss ngày tháng năm khi dùng trên netbean, các bác vào review hộ em với ạ, em không biết mình sai ở đâu.

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/* 
 * File:   main.c
 * Author: dong dao hieu
 *
 * Created on August 31, 2018, 3:45 AM
 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
 * 
 */
struct NewStudent
{
    char code[100];
    char name[100];
    char birth[100];
    float point;
};
void menu(){
    printf("1. Enter student list\n");
    printf("2. Look up student\n");
    printf("3. Display student list\n");
    printf("4. Exit\n");
    printf("Please chose an option: ");
}
void Add(struct NewStudent *st,int *n)
{
    printf("Student code:\n");
    fgets(st[*n].code,100,stdin);
    printf("Student name:\n");
    fgets(st[*n].name,100,stdin);
    printf("Date of birth:\n");
    fgets(st[*n].birth,100,stdin);
    printf("Learning point:\n");
    scanf("%f",&(st[*n].point));
    fpurge(stdin);
    (*(n))++;
}
void LookUp(struct NewStudent *st,int *n){
    char find[100];
    printf("please enter a name: ");
    fgets(find,100,stdin);
    for(int i=0;i<*n;i++){
        if(strcmp(st[i].name,find)==0)
        {
            printf("Student's code: \n");
            puts(st[i].code);
            printf("Student's name: \n");
            puts(st[i].name);
            printf("Date of birth: \n");
            puts(st[i].birth);
            printf("Learning point: \n");
            printf("%.1f",st[i].point);
        }
    }
}
void display(struct NewStudent *st,int *n)
{
    printf("student List: \n\n");
    for(int i=0;i<*n;i++)
    {
        printf("Student's code: \n");
        puts(st[i].code);
        printf("Student's name: \n");
        puts(st[i].name);
        printf("Date of birth: \n");
        puts(st[i].birth);
        printf("Learning point: \n");
        printf("%.1f",st[i].point);
        printf("\n");
        printf("===================================\n");
    }
}
int main() {
    int n=0;int a;
    struct NewStudent *st=(struct NewStudent*)malloc(sizeof(struct NewStudent));
    do{
        printf("\n");
        menu();
        scanf("%d",&a);
        fpurge(stdin);
        switch(a){
            case 1:{
                Add(st,&n);
                break;
            }
            case 2:{
                LookUp(st,&n);
                break;
            }
            case 3:{
                display(st,&n);
                break;
            }
            case 4:{
                return(EXIT_SUCCESS);
                break;
            }
        }
    }while(a>=1&&a<=4);
    return (EXIT_SUCCESS);
}

Quăng hết lên mà không có trật tự code sao mà đọc đc bạn

chưa xóa bộ đệm lúc nhập ngày tháng năm kìa , nghi vấn copy code trên mạng

ngày tháng năm mình dùng kiểu mảng ký tự , đầu tiên mình khai báo 1 mảng struct gồm các thông tin sinh viên, hàm Add là thêm các thông tin sinh viên, loockup là tìm thông tin của 1 sinh viên dựa vào tên của nó, hàm display là hàm hiển thị toàn bộ sinh viên, mỗi khi ADD thành công 1 sinh viên thì mảng struct này đc thêm 1 phần tử, muốn tìm kiếm hay hiển thị mảng này chỉ cần dùng 1 vòng for tương tự như trên mảng thường, mình chạy code trên dev C++ thì ok ko lỗi gì, nhwung dùng netbean để chạy thì khi out put bị mất đi ngày tháng năm ở các vị trí lẻ, mình tuyệtđối ko copcode đâu bạn, lần sau mình đăng lên sẽ giải thích rõ ràng hơn.

Bây giờ thời gian toàn dùng timestamp. Chẳng bao giờ lỗi :))

83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?