/* Exercise 1-16. Revise the main routine of the longest-line program so it will correctly print the length of arbitrarily long input lines, and as much as possible of the text. === */ #include #define MAX 1000 /* max line length */ /* read line into string, l, of length size, s, return length */ int readline(char l[], int s) { int c, i; for (i=0; im) { /* if longest */ m=l; copy(line, lngst); /* record it */ } } if (m) /* if lines were processed, print longest */ printf("%d: %s\n", m-1, lngst); }