This is a question for those familiar with K&R and for those who don't need to be. On page 29 second edition you can find the following function as part of a program. I don't understand how the value of "lim" is decided.
I believe this function will return the length of the program but I can't figure out how if it doesn't know what lim is.Code:int getline(char s[], int lim) { int c, i; for (i = 0; i < lim - 1 && (c=getchar()) != EOF && c != '\n'; ++i) s[i] = c; if ( c == '\n') { s[i] = c; i++ } s[i] = c; return i; }