Developpement/23DEV1.1/TPS1/TP01/11-Adresses/Undead.c

20 lines
275 B
C
Raw Permalink Normal View History

2024-12-09 11:53:11 +01:00
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
int main(void) {
int* p;
if(time(NULL)%2) {
int x = 59;
p = &x;
} else {
int y = 31;
p = &y;
}
printf("x=%d\n", x);
printf("y=%d\n", y);
printf("%d\n", *p);
return EXIT_SUCCESS;
}