init projet
This commit is contained in:
33
tp1/Sources-TD1/Exercice5.c
Normal file
33
tp1/Sources-TD1/Exercice5.c
Normal file
@@ -0,0 +1,33 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int *x1[1], *x2[1], y[1], z[1];
|
||||
|
||||
void f(int **p) {
|
||||
**p = 2;
|
||||
*p = y;
|
||||
**p = 3;
|
||||
p = x2;
|
||||
*p = z;
|
||||
**p = 4;
|
||||
// Fin de f
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
int **p, ***q, **r, *s, t;
|
||||
|
||||
p = x1;
|
||||
*p = &t;
|
||||
**p = 1;
|
||||
q = &p;
|
||||
r = p;
|
||||
s = *p;
|
||||
|
||||
printf("%d %d %d %d %d %d \n", ***q, **p, **r, *s, *z, t);
|
||||
|
||||
f(p);
|
||||
|
||||
printf("%d %d %d %d %d %d \n", ***q, **p, **r, *s, *z, t);
|
||||
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
Reference in New Issue
Block a user