Et attention, le fichier est ouvert deux fois:


fichier = fopen("datasin.bin", "r+");
if ((fichier = fopen("datasin.bin", "wb")) == NULL) {