summaryrefslogtreecommitdiffstats
path: root/5/5.c
diff options
context:
space:
mode:
authorSadeep Madurange <smadurange@users.noreply.github.com>2021-12-31 16:55:36 +0800
committerSadeep Madurange <smadurange@users.noreply.github.com>2021-12-31 16:55:36 +0800
commite1ed3268351e6b4bd2310b22e984eb6a852fa2d6 (patch)
tree43a18c118b2a3591147f229a2550de1f3a10b793 /5/5.c
parenta79615eee96227505fba4f2818321a00eef1982d (diff)
downloadk&r-exercises-e1ed3268351e6b4bd2310b22e984eb6a852fa2d6.tar.gz
5.5
Diffstat (limited to '5/5.c')
-rw-r--r--5/5.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/5/5.c b/5/5.c
index f9156ef..eedab80 100644
--- a/5/5.c
+++ b/5/5.c
@@ -20,8 +20,9 @@ int main(int argc, char *argv[]) {
mstrncpy(s, t, n);
printf("mstrncpy: %s\n", s);
+ n = 7;
t = "may the force be with you";
- mstrncat(s, t, 7);
+ mstrncat(s, t, n);
printf("mstrncat: %s\n", s);
free(s);