21 lines
358 B
C
21 lines
358 B
C
/* Inversion de variables */
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
int main() {
|
|
char prenom = 'A', nom = 'Z', tmp;
|
|
|
|
char *p_prenom = &prenom;
|
|
char *p_nom = &nom;
|
|
|
|
printf("vos initiales : %c.%c\n", prenom, nom);
|
|
|
|
tmp = *p_prenom;
|
|
prenom = *p_nom;
|
|
nom = tmp;
|
|
|
|
printf("vos initiales : %c.%c\n", prenom, nom);
|
|
|
|
return 0;
|
|
}
|