Advertisement
Biddle

3

Mar 28th, 2014
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. struct list_student * inverser_liste(struct list_student * L)
  2. {
  3. // focntion qui inverse une liste
  4. struct list_student * L2 = (struct list_student *) malloc (sizeof(struct list_student));
  5. L2 = NULL;
  6. while(L!=NULL)
  7. {
  8. L2= ajout_etudiant(L->Letudiant, L2);
  9. L = L->suivant;
  10. }
  11. return L2;
  12. };
  13.  
  14. int main(){
  15. struct list_student * liste_etudiant = creer_liste();
  16. struct list_student * inversee = inverser_liste(liste_etudiant);
  17. printf("\nListe inversee :\n");
  18. affiche_liste(inversee);
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement