关于c:Programming-abstractions-in-C阅读笔记p132p137

6次阅读

共计 1128 个字符,预计需要花费 3 分钟才能阅读完成。

《Programming Abstractions In C》学习第 53 天,p132-p137,3.2 大节“strings”总结如下:

一、技术总结

3.2 大节介绍了字符串的用法:

1.C 语言是没有字符串 (string) 这种数据类型的,然而理论的场景中又很须要这种数据类型,那怎么示意字符串呢?有两种办法:1. 用字符数组示意。2. 用字符指针示意。

2.C 自带的字符串库是 string,作者为了更好的应用 string,封装出了 strlib 库,所以在书中的代码常常会看到作者在头文件中引入 strlib 这个库,而不是间接援用 string 库。

3. 执行字符串复制的时候要思考是否会产生 buffer overflow 问题。

二、英语总结

1.rather 什么意思?

答:p132,“Note that this test does not check whether the strings are equal but rather whether the pointer are equal”。rather 在这里的意思是“adv. used to express an opposite opion”,用于表白一种相同的观点,具体的意思依据上下文。例如在这句话外面的意思是“而是”。

2.impose 什么意思?

答:in-(*en, “into, in”) + pose(“put, place”),vt. to introduce sth(引入),暗含“强制”之意。p132,Because the complexity imposed by string.h interface tends to get in the way of understanding more critical algorithmic issues,so…(因为 string.h 接口带来的复杂性往往会障碍了解更要害的算法问题,所以 ……)。

3.present 什么意思?

答:vt. to give, provide in a formal way。绝对于 give 或者 provide 而言,present 更正式一些。p132,The interface is called strlib.h and is presented in its complete form in Figure 3-6。

三、参考资料

1. 编程

(1)Eric S.Roberts,《Programming Abstractions in C》:https://book.douban.com/subject/2003414

2. 英语

(1)Etymology Dictionary:https://www.etymonline.com

(2) Cambridage Dictionary:https://dictionary.cambridge.org

欢送搜寻及关注:编程人(a_codists)

正文完
 0