K&R Exercises

Exercise 1-18: Remove trailing blanks and tabs

Write a program to remove trailing blanks and tabs from each line of input, and to delete entirely blank lines.

A line is entirely blank if nothing is left after removing its trailing blanks and tabs. Keep each line's newline, if it has one.

Test Cases

· space→ tab↵ newline

Submissions

No submissions yet