Compare commits

...

2 commits

5 changed files with 81 additions and 0 deletions

8
DS1-2015/E3.in Normal file
View file

@ -0,0 +1,8 @@
-3
4
6
-8
1
-1
-1
1

20
DS1-2015/E4-1.in Normal file
View file

@ -0,0 +1,20 @@
5
-1
1
-2
4
1
-3
-1
1
-1
-1
1
-2
4
-1
5
-3
9
2

19
DS1-2015/E4-2.in Normal file
View file

@ -0,0 +1,19 @@
5
-2
-1
4
-2
1
-3
-1
1
-1
-1
1
-2
2
-1
7
-1
5
-4

23
P84.c Normal file
View file

@ -0,0 +1,23 @@
/* Allocations dynamiques */
#include <stdlib.h>
#include <stdio.h>
void init(int *tab, int n) {
int i;
for (i = 0; i < n; i++) {
tab[i] = i;
printf("tab[%d]=%d\n", i, tab[i]);
}
}
int main() {
int i, n, *tab;
printf("Saisissez n : ");
scanf("%d", &n);
tab = (int *) malloc(n * sizeof(int));
init(tab, n);
return 0;
}

11
P86.c Normal file
View file

@ -0,0 +1,11 @@
/* Arguments */
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
int i;
for (i = 0; i < argc; i++) {
printf("argv[%d]=%s\n", i, argv[i]);
}
}