Write a program that reads all input (from standard input) and prints it transformed as follows:

  • any sequence of whitespace that does not contain newline is replaced with a single space character
  • whitespace characters immediately before a newline are deleted.

I'm just starting out in C and I need some helping understanding this problem. My main issue would be how do I print the modified text after making the program? If you decide to solve it, please use comments so I can understand what you're doing. Thank you!!