练习:
Modify the programs entab and detab (written as exercises in Chapter 1) to accept a list of tab stops as arguments. Use the default tab settings if there are no arguments.
我不确定制表位列表是什么?
我的猜测:./entab -t 5,5,8,5
第一个制表位是 5 个空格,第二个是 5 个,第三个是 8 个,第四个是 5 个?
最佳答案
当我做这个练习时,我使用了“列”数字。
./entab -t 4,8,12,32,66
这模仿了打字机上制表位的行为,打字机是一种原始机器,当我做那个练习时(以及 K&R 写这本书时),它比现在更受欢迎。
我想念打字机。
关于c - 无法满足 K&R 练习 5-11 的要求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6798702/