update
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/*Définissez les types nécessaires pour une file de caractères :*/
|
||||
struct maillon_s {
|
||||
char valeurs;
|
||||
struct maillon_s* suivant;
|
||||
};
|
||||
|
||||
struct file_s {
|
||||
struct maillon_s* premier;
|
||||
struct maillon_s* dernier;
|
||||
}
|
||||
|
||||
typedef struct maillon_s maillon;
|
||||
typedef struct file_s file;
|
||||
|
||||
|
||||
char dequeue(file* f){
|
||||
maillon m = *(f->premier); /*je fais une copie de tout ce qu'il y a dans le maillo A*/
|
||||
free(f->premier);
|
||||
f->premier = m.suivant;
|
||||
|
||||
if(f->premier==NULL){
|
||||
f->dernier=NULL;
|
||||
}
|
||||
return m.valeur
|
||||
}
|
||||
|
||||
int main(void){
|
||||
return 0;
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
@@ -0,0 +1,25 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
typedef struct {
|
||||
char tab[50];
|
||||
int indice_debut;
|
||||
int indice_fin;
|
||||
int taille;
|
||||
} car_file;
|
||||
|
||||
|
||||
char dequeue(car_file* f){
|
||||
f->indice_debut=(f->indice_debut+1)%50;
|
||||
f-taille--;
|
||||
return f->tab[(f->indice_debut+49)%50];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int main(void){
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user