K&R Exercise 1-21 - Mental incomprehension.

Posted by asdfg on Stack Overflow See other posts from Stack Overflow or by asdfg
Published on 2010-06-11T03:34:35Z Indexed on 2010/06/11 3:43 UTC
Read the original article Hit count: 252

Filed under:
|
|

The "impossible" K&R exercise.

"Write a program entab that replaces strings of blanks by the minimum number of tabs and blanks to achieve the same spacing. Use the same tab stops, say every n columns. Should n be a variable or a symbolic parameter?"

The problem I'm having is, I'm unsure about how to even do this correctly. I know it's not very explanatory, but that's pretty much the problem here. Most of the examples I've seen have counted a number of blanks, and replaced those series with a tab, but this isn't what its asking, I reckon I understand what its asking, but currently feel unable to do this.

Could anyone help :)

© Stack Overflow or respective owner

Related posts about c

    Related posts about beginner