Version without JavaScript, read-only: workshops, quizzes and running code are not available here. Full version · Catalogue · Sign in

Exercise sheet 4

Data structures

Read signatures, write list functions with a pointer to a pointer, find the bugs in a module, a stack and a binary search tree as abstract types. Chapter 4.

Unless stated otherwise, the lists are those of chapter 4:

typedef struct s_liste *t_liste;

struct s_liste
{
    int     val;
    t_liste suivant;
};

t_liste ajouter(int x, t_liste l);      /* adds x at the head */
void    detruire(t_liste l);

All programs are compiled with gcc -std=c11 -Wall -Wextra -Werror, and must pass valgrind --leak-check=full with no error and no leak.