Posted: September 1st, 2021
(Homework Problem 3.71 on textbook Page 323) Write a function good_echo that reads a line from standard input and writes it to standard output. Your implementation should work for an input line of arbitrary length. You may use the library function fgets, but you must make sure your function works correctly even when the input line requires more space than you have allocated for your buffer. (Hint, think about read only to the limit of your buffer, print out the content of the buffer to standard output and then reuse the buffer to read more from the standard input.) You code should also check for error conditions and return when one is encountered
Place an order in 3 easy steps. Takes less than 5 mins.