BUT2/DEV/DEV1.1/TP_adresses/q3.c

20 lines
277 B
C
Raw Normal View History

2023-10-23 13:23:36 +02:00
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
int main(void) {
int* p;
if(time(NULL)%2) {
int x = 59;
p = &x;
printf("x=%d\n", x);
} else {
int y = 31;
p = &y;
printf("y=%d\n", y);
}
printf("%d\n", *p);
return EXIT_SUCCESS;
}