typedef struct
{
    char nom[20];
    float taille ;
    short int age ;
} T_ETUD ;
//------------------------------------------------------------------------
void main(void)
{
    T_ETUD* pUnEtudiant ; /* pointeur pour la variable structurée */
    T_ETUD* ListeEtudiant ; /* pointeur pour le TABLEAU de structures */
    short int i, nb_etud = 0 ;
    printf("Tapez le nombre d'étudiants :");
    scanf("%hd", &nb_etud );
    /* ALLOCATION D'UNE VAR. STRUCTUREE : */
    pUnEtudiant = (T_ETUD*) malloc( sizeof(T_ETUD) );
    if (pUnEtudiant==NULL)
    {
        printf("\n Allocation dynamique impossible !");
        exit(1) ; // on quitte le programme
    }
    /* ALLOCATION D'UN TABLEAU DE STRUCTURES : */
    ListeEtudiant = (T_ETUD*) malloc( nb_etud * sizeof(T_ETUD) );
    if (ListeEtudiant==NULL)
    {
        printf("\n Allocation dynamique impossible !");
        exit(1) ; // on quitte le programme
    }
    /* UTILISATION DE LA VARIABLE : via un pointeur uniquement */
    pUnEtudiant -> taille = 1.75 ;
    /* UTILISATION DU TABLEAU : comme tous les tableaux "normaux" */
    for (i=0 ; i<nb_etud ; i++) ListeEtudiant[i].age = 18 ;
    /* LIBERATION MEMOIRE : */
    free(pUnEtudiant) ;
    free(ListeEtudiant);
}
