summaryrefslogtreecommitdiffstats
path: root/1
diff options
context:
space:
mode:
authorSadeep Madurange <smadurange@users.noreply.github.com>2021-11-19 21:43:05 +0800
committerSadeep Madurange <smadurange@users.noreply.github.com>2021-11-19 21:43:05 +0800
commit13e92a3c600e010757314e60a679dad2fb0149a9 (patch)
tree233dd09bfcf543df53d733ce9de3a3f68ff19e4a /1
parentec5e3c0cfaf71b955cc8c664e185b5b73c4b0548 (diff)
downloadk&r-exercises-13e92a3c600e010757314e60a679dad2fb0149a9.tar.gz
Code formatting.
Diffstat (limited to '1')
-rw-r--r--1/16.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/1/16.c b/1/16.c
index 81ec7e2..3d48946 100644
--- a/1/16.c
+++ b/1/16.c
@@ -37,7 +37,7 @@ int mgetline(char s[], int lim) {
if (c == '\n')
s[i++] = c;
-
+
s[i] = '\0';
return i;
@@ -45,6 +45,7 @@ int mgetline(char s[], int lim) {
void copy(char to[], char from[]) {
int i;
+
for (i = 0; (to[i] = from[i]) != '\0'; i++)
;
} \ No newline at end of file