summaryrefslogtreecommitdiff
path: root/wk4/lect
diff options
context:
space:
mode:
Diffstat (limited to 'wk4/lect')
-rw-r--r--wk4/lect/copy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wk4/lect/copy.c b/wk4/lect/copy.c
index 7601d04..fe53251 100644
--- a/wk4/lect/copy.c
+++ b/wk4/lect/copy.c
@@ -12,7 +12,7 @@ int main(void)
return 1;
}
- char *t = malloc(strlen(s) + 1);
+ char *t = malloc(strlen(s) + 1); // allocates a piece of memory for the new string with the same length as s
if (t == NULL)
{
return 1;