Programming abstractions in C阅读笔记:p184-p195
《Programming Abstractions In C》学习第61天,p184-p195总结。
一、技术总结
1.mutual recursion
2.natural number
(1)定义
p184, If you limit the domain of possible values to the set of natural numbers,which are defined simply as the set of nonnegative integers.
3.最大公约数
/*
* p191. 3. The greatest common divisor(g.c.d) of two nonnegative integers is the
* largest integer that divides evenly into both. In the third century B.C., the
* Greek mathematician Euclid discovered that the greatest common divisor of x
* and y can always be computed as follows:
*
* If x is evenly divisible by y, then y is the greatest common divisor.
* Otherwise, the greatest common divisor of x and y is always equal to the
* greatest common divisor of y and the remainder of x divided by y.
*
* Use Euclid insight to write a recursive function GCD(X, Y) that computes the
* greatest common divisor x and y.
*/
#include <stdio.h>
int gcd(int x, int y);
/*
* function: gcd
* Usage: int(x, y)
* ------------
*/
int gcd(int x, int y) {
if (x % y == 0) {
return y;
}
return gcd(y, x % y);
}
int main() {
int result;
result = gcd(16, 28);
printf("GCD=%d\n", result); // GCD=4
return 0;
}
二、英语总结
1.holistic是什么意思?
答:
(1)holistic: holism + -istic。adj. treat the whole of sth and not just a part(整体的)。
(2)holism: holos("whole",来自于“*sole”,完整的) + -ism(word-forming element making nouns implying a practice, system, doctrine, etc. 构成词的元素,暗示实践、制度、学说等)。u. the belief that each thing is a whole that is more important the parts that make it up,整体论。
(3)-istic: adjectival word-forming element(构成形容词的元素)。
(4)示例:p185, Maintain a holistic perspective(保持整体的观点)。
2.philosophical是什么意思?
(1)philosophical: philosophy + -ical。adj. relating to the study of philosophy(哲学的)。
(2)philosophy: philo-("loving") + sophia("knowledge, wisdom"),哲学。
3.devote是什么意思?
答:de-(down from,away from, 离开) + vow(to vow“make a promise to do sth, 发誓”),即as if by vow。
(1) vt. to use sth for a particular purpose(使用)。p185,In Chapter 2 of The Art and Science of C, I devote one section to the philosophical concepts of holism and reductionnism(在《在C语言的科学与艺术》第二章,我专门用一节来介绍整体论与还原论这两个哲学概念。)
4.odds are good是什么意思?
答:
(1)odds: n. the probalility that a particular thing will or will not happend(可能性)。
(2)odds are good: There is a high probability that it will happen(可能性很大)。
(3)示例:p185,After all, when you write a program, the odds are good--even if you are an experienced programmer--that your program won't work the first time。
三、参考资料
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)
Programming abstractions in C阅读笔记:p184-p195的更多相关文章
- Mongodb Manual阅读笔记:CH3 数据模型(Data Models)
3数据模型(Data Models) Mongodb Manual阅读笔记:CH2 Mongodb CRUD 操作Mongodb Manual阅读笔记:CH3 数据模型(Data Models)Mon ...
- Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第二十三章:角色动画
原文:Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第二十三章:角色动画 学习目标 熟悉蒙皮动画的术语: 学习网格层级变换 ...
- Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第十一章:模板测试
原文:Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第十一章:模板测试 代码工程地址: https://github.co ...
- Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第六章:在Direct3D中绘制
原文:Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第六章:在Direct3D中绘制 代码工程地址: https://gi ...
- Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第四章:Direct 3D初始化
原文:Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第四章:Direct 3D初始化 学习目标 对Direct 3D编程在 ...
- Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第二章:矩阵代数
原文:Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第二章:矩阵代数 学习目标: 理解矩阵和与它相关的运算: 理解矩阵的乘 ...
- Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第一章:向量代数
原文:Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第一章:向量代数 学习目标: 学习如何使用几何学和数字描述 Vecto ...
- 阅读笔记 1 火球 UML大战需求分析
伴随着七天国庆的结束,紧张的学习生活也开始了,首先声明,阅读笔记随着我不断地阅读进度会慢慢更新,而不是一次性的写完,所以会重复的编辑.对于我选的这本 <火球 UML大战需求分析>,首先 ...
- [阅读笔记]Software optimization resources
http://www.agner.org/optimize/#manuals 阅读笔记Optimizing software in C++ 7. The efficiency of differe ...
- 《uml大战需求分析》阅读笔记05
<uml大战需求分析>阅读笔记05 这次我主要阅读了这本书的第九十章,通过看这章的知识了解了不少的知识开发某系统的重要前提是:这个系统有谁在用?这些人通过这个系统能做什么事? 一般搞清楚这 ...
随机推荐
- pta2023年9月7日 第五期
5月23日 11月14日 有效期3年: 更新方式待定: 双方认证合作CCF编程培训师资认证(PTA)中国计算机学会https://pta.ccf.org.cn/中国科教工作者协会(原:中国青 ...
- 畅捷通T+任意文件上传(CNVD-2022-60632 )漏洞复现
一.漏洞描述 022年8月29日和8月30日,畅捷通公司紧急发布安全补丁修复了畅捷通T+软件任意文件上传漏洞.未经身份认证的攻击者利用该漏洞,通过绕过系统鉴权,在特定配置环境下实现任意文件的上传,从而 ...
- 从0到1实现 OpenTiny 组件库跨框架技术
本文分享自华为云社区<从0到1实现 OpenTiny 组件库跨框架技术>,作者:华为云社区精选 . 在华为云<DTSE Tech Talk>技术直播第44期<0基础玩转 ...
- 如何去掉桌面快捷方式左下角的小箭头(Win11)
在对系统重命名之后,在快捷方式的左下角莫名的出现了小图标 如果想要去掉这个小图标 (1)首先在桌面上创建一个txt文件 (2)打开后输入指令 reg add "HKEY_LOCAL_MACH ...
- CF1610B [Kalindrome Array]
Problem 题目简述 给你一个数列 \(a\),有这两种情况,这个数列是「可爱的」. 它本身就是回文的. 定义变量 \(x\),满足:序列 \(a\) 中所有值等于 \(x\) 的元素删除之后,它 ...
- mysql查看索引利用率
-- mysql查看索引利用率 -- 如果很慢把排序去掉,加上limit 并且在where条件中限定表名. -- cardinality越接近0,利用率越低 SELECT t.TABLE_SCHEMA ...
- JUC并发编程学习笔记(十二)Stream流式计算
Stream流式计算 什么是Stream流式计算 大数据:存储+计算 集合.MySql这些的本质都是存储东西的: 计算都应该交给流来操作! 一个案例说明:函数式接口.lambda表达式.链式编程.St ...
- MyBatis核心流程
摘要 mybatis的核心流程,主要是对于主线的一个探索.目的是对于整个mybatis流程有个初步的印象 核心流程 核心流程搞懂:主线,涉及的模块不深究.再去基础支持层,再回来核心. /** * My ...
- ALSA Compress-Offload API
概述 从 ALSA API 的早期开始,它就被定义为支持 PCM,或考虑到了 IEC61937 等固定比特率的载荷.参数和返回值以帧计算是常态,这使得扩展已有的 API 以支持压缩数据流充满挑战. 最 ...
- Static关键词
在程序中使用static 变量 1. 局部变量 普通局部变量是再熟悉不过的变量了,在任何一个函数内部定义的变量(不加static修饰符)都属于这个范畴.编译器一般不对普通局部变量进行初始化,也就是说它 ...