Question: Problem description: Your program must read the standard input and write to the stan dard output. It must copy the input line to the output

Problem description: Your program must read the standard input and write to the stan dard output. It must copy the input line to the output exactly as they are, and at the very end, just before the newline character, it must print a colon (') and the line length. For example, if the input file looks as follows: This is the first line No line above one more The output must be: This is the first line.:23 No line above. 14 one more. :9 You can assume that the input always ends with a newline character. a) [15 marks] Functionality: To satisfy this requirement, your program must satisfy the program requirements as specified and pass the practicum testing b) 5 marks] Implementation: To receive these 5 marks, the program must be implemented in the following way, and it will be marked by a marker. The program must use the getchar and putchar functions to copy input characters to the output. You should not use arrays to save characters. Instead, your program should read character by character and print them out as soon as they are read, and count them as well. Once the program reads the newline character n), t will print a colon (:) and the number of characters. You should use the printf function to print it
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
