« Exercices en langage C/Fonctions » : différence entre les versions
Contenu supprimé Contenu ajouté
→Solution proposée : Simplification malloc -> realloc(NULL, suppresion tabulation. |
→Éléments fournis : free(NULL) autorisé par la norme + indentation |
||
Ligne 60 :
===Éléments fournis===
<div style="width:
<source lang="c">
/**
Ligne 121 :
}} </div>
<div style="width:
<source lang="c">
/*
Ligne 157 :
}} </div>
<div style="width:
<source lang="c">
/*
Ligne 163 :
* Role ........ : Tester la fonction lire_ligne
* Parametre ... : Aucun
*
*
*
*
lire_ligne : Lecture d'une ligne longue dans un fichier texte
Copyright (C) 2008 Thierry46
Ligne 184 :
*
* Compilation . :
*
*
* Exécution : ./test_lire_ligne.exe
* Fichiers lies : lire_ligne.c, lire_ligne.h, test_lire_ligne.txt
Ligne 201 :
int main(void)
{
{
}
{
}
{
}
▲ free(chaine);
{
▲ } while (retour == EXIT_SUCCESS);
}
▲ if (hFicTest != NULL)
▲ (void)fclose(hFicTest);
▲ return EXIT_SUCCESS;
} // int main(void)
</source>
}} </div>
<div style="width:
<pre>
1
|