I'm stuck on section 1.9 in the K&R book.
My main problem is that I copied the code from the book verbatim and it's not printing the string for me. I'm not getting any errors when I compile. When I run the program I type in some lines and hit control-D to trigger EOF, and it doesn't print the string from the 'longest' array - printf("%s", longest);
other confusion with arrays as function arguments:
in the 'copy' function, to and from are in the function prototype, but their length is never defined, as opposed to line and longest, which are specified in main()
also it is confusing to me how getline() has (char line, int maxline) in its prototype, but calls (char s, and int lim) in its definition. Where as copy() uses the same arguments for its prototype and its definition.
many thanks for any help!