Files
prog-c/tp1/Sources-TD1/Exercice7.c
2024-10-06 15:32:20 +02:00

40 lines
537 B
C

#include <stdio.h>
#include <stdlib.h>
int x1, y1, y2, z1, z2;
int *px1 = &x1,
*py1 = &y1, *py2 = &y2,
*pz1 = &z1, *pz2 = &z2;
void aux(int **p, int ***q)
{
**p = 2;
***q = 99;
*p = pz1;
**p = 12;
p = &py2;
*q = &px1;
**p = 4;
***q = 42;
}
int main(void)
{
int **p, **q, ***r, s, *t;
p = &py1;
q = &px1;
r = &q;
*p = &s;
**q = 1;
**p = 34;
***r = 76;
t = **r;
r = &p;
aux(p, &q);
printf("%d %d %d %d %d \n",
**q, **p, ***r, s, *t);
return 1;
}