#include #include void main(void) { int* ptr = (int*) malloc(sizeof(int)); if (ptr == NULL) { printf("Allocation avortee\n"); } else { printf("Allocation reussie a l'adresse : %p\n", ptr); } if (ptr != NULL) { printf("Desallocation a l'adresse : %p\n", ptr); free(ptr); ptr = NULL; } else { printf("Attention, tentative de desallocation de NULL"); } }