repositories
/
TD_C.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TP_8 exo2: be more explicative about a false malloc invocation.
[TD_C.git]
/
TP_8
/
exo1
/
exo1.c
diff --git
a/TP_8/exo1/exo1.c
b/TP_8/exo1/exo1.c
index beea2f689f02cc43e785b4eb3077f2bcd6de5f79..b0e5df93e53151a5cd8ad194b842f159162cc486 100644
(file)
--- a/
TP_8/exo1/exo1.c
+++ b/
TP_8/exo1/exo1.c
@@
-11,7
+11,7
@@
int main() {
int* arr;
printf("Longeur?\n");
int size = promptValue();
int* arr;
printf("Longeur?\n");
int size = promptValue();
- //arr = malloc(sizeof(arr[size]));
+ //arr = malloc(sizeof(arr[size]));
prend la taille de l'élément à la position de l'index = size
arr = malloc(sizeof(int)*size);
for (int i = 0; i < size; i++) {
arr = malloc(sizeof(int)*size);
for (int i = 0; i < size; i++) {