8 Novembre
This commit is contained in:
19
DEV1.1/TP08:Adresses/mort-vivant.c
Normal file
19
DEV1.1/TP08:Adresses/mort-vivant.c
Normal file
@@ -0,0 +1,19 @@
|
||||
#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 0;
|
||||
}
|
||||
Reference in New Issue
Block a user