DS du 18 octobre 2016 : elements de correction Exercice 1 ========== (1) a=0, b=5, c=4 (2) a=0, b=5, c=7 (3) a=2, b=9, c=10 (4) a=0, b=9, c=10 Exercice 2 ========== void A(int b, int *x) { if (b) { *x = - (*x) ; } else { *x = *x + 1 ; } ; int i ; A (i<=0, &i) ; Exercice 3 ========== Q1. #define TailleMaxMot 50 typedef char Nom[TailleMaxMot] ; typedef struct { int code_postal ; Nom ville ; } Adresse ; Q2. typedef Adresse SeqAdresse[100]; et toute variable de ce type devra etre accompagnee d'un entier representant le nombre d'element effectif Q3. void Afficher (SeqAdresse T, int N) { int i ; for (i=0 ; i=0) && (i<=N) && (j>=0) && (j<=N) { tmp.code_postal = (T[i]).code_postal ; strcpy(tmp.ville, (T[i]).ville) ; (T[i]).code_postal = (T[j]).code_postal ; strcpy((T[i]).ville, T[j].ville) ; (T[i]).code_postal = tmp.code_postal ; strcpy((T[i]).ville, tmp.ville) ; } } Q4. int Chercher (SeqAdresse T, int N, Nom v, int *c) { int i; i = 0 ; while ( i