diff options
| author | Sadeep Madurange <smadurange@users.noreply.github.com> | 2021-12-31 16:55:36 +0800 |
|---|---|---|
| committer | Sadeep Madurange <smadurange@users.noreply.github.com> | 2021-12-31 16:55:36 +0800 |
| commit | e1ed3268351e6b4bd2310b22e984eb6a852fa2d6 (patch) | |
| tree | 43a18c118b2a3591147f229a2550de1f3a10b793 | |
| parent | a79615eee96227505fba4f2818321a00eef1982d (diff) | |
| download | k&r-exercises-e1ed3268351e6b4bd2310b22e984eb6a852fa2d6.tar.gz | |
5.5
| -rw-r--r-- | 5/5.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); |
