K&R C Exercise 1-20: detab — Replace Tabs with Spaces
Exercise 1-20. Write a program detab that replaces tabs in the input with the proper number of blanks to space to the next tab stop. Assume a fixed set of tab stops, say every n columns. Should n be a variable or a symbolic parameter? Approach The key insight is that a tab does not …