From 6f4c5b043451ebb574c35e0d7a2a77c000cf1a8e Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Sat, 20 Nov 2021 22:30:13 +0800 Subject: 1.19 --- 1/19.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '1') diff --git a/1/19.c b/1/19.c index 5ddca85..ef586fa 100644 --- a/1/19.c +++ b/1/19.c @@ -2,7 +2,7 @@ #define MAXLEN 1000 -int cgetline(char s[], int max); +int mygetline(char s[], int max); void reverse(char s[], int size); /* reverses input string */ @@ -10,7 +10,7 @@ int main(int argc, char *argv[]) { int size; char s[MAXLEN]; - while ((size = cgetline(s, MAXLEN)) > 0) { + while ((size = mygetline(s, MAXLEN)) > 0) { reverse(s, size); printf("%s\n", s); } @@ -23,7 +23,7 @@ int main(int argc, char *argv[]) { return 0; } -int cgetline(char s[], int max) { +int mygetline(char s[], int max) { int c, i; for (i = 0; i < max - 1 && (c = getchar()) != EOF && c != '\n'; i++) -- cgit v1.2.3