1. To make the program easier to read, which in turn makes it easier to maintain later.
3. It is easier to see what a named constant represents, if it is well named, than a literal constant,
which merely displays its value.
4. “%d %s %g\n”
6. The programmer can put in subscript checks where they are needed; in places where the subscript is already known to be correct (for example, from having been checked earlier), there is no
overhead expended in checking it again. But the real reason they are omitted is the fact that subscripts are implemented as pointer expressions, which are described in Chapter 8
7. More characters would be copied than are actually needed; however, the output_col would be
updated properly, so the next range of characters would be copied into the output array at the
proper place, replacing any extra characters from the preceding operation. The only potential
problem is that the unbounded strcpy might copy more characters into the output array than it
has room to hold, destroying some other variables.
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
全部0条评论
快来发表一下你的评论吧 !