SCR et DEV
This commit is contained in:
22
DEV1.1/TP16/tests.c
Normal file
22
DEV1.1/TP16/tests.c
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
|
||||
|
||||
void inverse_variables(int a, int b) {
|
||||
int temp;
|
||||
temp = a;
|
||||
a = &b;
|
||||
b = &temp;
|
||||
}
|
||||
|
||||
|
||||
int main(void) {
|
||||
int x, y;
|
||||
x = 12;
|
||||
y = 5;
|
||||
printf("avant : x = %d y = %d\n", x, y);
|
||||
inverse_variables(x, y);
|
||||
printf("avant : x = %d y = %d\n", x, y);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
Reference in New Issue
Block a user