[Solved] How does this code counting the number of characters, lines, and words work? [closed]
[ad_1] strlen( line ) Give the number of characters in line. (Check man strlen.) num_chars += strlen( line ) Add that number to num_chars. strncmp( line, “”, MAX_LINE_LEN ) Compare the contents of line with the empty string (but just to be on the safe side, do not read more than MAX_LINE_LEN characters of line, … Read more