repositories
/
TD_C.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7480135
)
TP 8 exo1: Fix a memory allocation comment.
author
Jerome Benoit
<jerome.benoit@sap.com>
Fri, 3 Mar 2017 19:12:53 +0000
(20:12 +0100)
committer
Jerome Benoit
<jerome.benoit@sap.com>
Fri, 3 Mar 2017 19:14:42 +0000
(20:14 +0100)
Signed-off-by: Jerome Benoit <jerome.benoit@sap.com>
TP_8/exo1/exo1.c
patch
|
blob
|
blame
|
history
diff --git
a/TP_8/exo1/exo1.c
b/TP_8/exo1/exo1.c
index b0e5df93e53151a5cd8ad194b842f159162cc486..c810c05d6ccb19c139d82a4c2ccd27188c70d7c9 100644
(file)
--- a/
TP_8/exo1/exo1.c
+++ b/
TP_8/exo1/exo1.c
@@
-11,7
+11,8
@@
int main() {
int* arr;
printf("Longeur?\n");
int size = promptValue();
- //arr = malloc(sizeof(arr[size])); prend la taille de l'élément à la position de l'index = size
+ //arr[size];
+ //arr = malloc(sizeof(arr));
arr = malloc(sizeof(int)*size);
for (int i = 0; i < size; i++) {