init projet
This commit is contained in:
20
tp1/Sources-TD1/Exercice6.c
Normal file
20
tp1/Sources-TD1/Exercice6.c
Normal file
@@ -0,0 +1,20 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void) {
|
||||
int a = 1, b = 2, c = 3, d = 4;
|
||||
int *p1 = &a, **p2 = &p1, *p3 = &c, *p4 = &b, **p5 = &p3, *p6 = &d;
|
||||
|
||||
*p3 = **p2 + 6;
|
||||
*p2 = p3;
|
||||
*p1 = *p4 * 5;
|
||||
p5 = &p6;
|
||||
**p5 = **p5 + **p2;
|
||||
*p4 = *p3 + 14;
|
||||
*p5 = p1;
|
||||
**p2 = 1 + **p2;
|
||||
**p5 = **p5 * **p2;
|
||||
|
||||
printf("a, b ,c and d are equal to: %d, %d, %d and %d\n", a, b, c, d);
|
||||
return 1;
|
||||
}
|
||||
Reference in New Issue
Block a user