Exercise: Read Line Into String from stdin
¶
Write a (nonsensial) program that …
Reads standard input line by line. To do so, implement a function
read_line(char line[], int maxlen)
(which internally usesgetchar()
)Outputs the longest line at end of input.