commit 64af102f736c4ef596d82f1a48e3536927ce32b0 from: jrmu date: Sun Jan 25 02:08:14 2026 UTC Add solution for 1-20 commit - 5a3cc2ca160febcfc5fc81eb508016154cce2510 commit + 64af102f736c4ef596d82f1a48e3536927ce32b0 blob - a07c8fabfb78cd087ef005abf009b4772cec9236 blob + e9b378a2dd0b8cbeff0753c414845268108a3fba --- 1-20.c +++ 1-20.c @@ -2,59 +2,3 @@ * number of blanks to space to the next tab stop. Assume a fixed set of tab * stops, say every n columns. Should n be a variable or a symbolic parameter? * */ - -#include - -#define MAXLINE 1000 /* maximum input line size */ - -int getlin(char line[], int maxline); -void reverse(char s[]); -int length(char s[]); - -int main() { - int len; /* current line length */ - char line[MAXLINE]; /* current input line */ - - while ((len = getlin(line, MAXLINE)) > 0) { - reverse(line); - printf("%s", line); - } - return 0; -} - -/* getlin: read a line into s, return length */ -int getlin(char s[], int lim) { - int c, i; - - for (i=0; i