Programming abstractions in C阅读笔记:p84-p87

这篇具有很好参考价值的文章主要介绍了Programming abstractions in C阅读笔记:p84-p87。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

《Programming Abstractions In C》学习第43天,p84-p87总结。
一、技术总结
1.record
record也称为structure(结构体),是一种数据结构。record里面的成员称为record的field。对于record,需要其基本用法:定义、声明、field访问以及其与指针的关系。示例:


// 定义structure type语法:
/*
typedef struct {
    field-declarations; // structure里面的成员称为field
} name; // structure的名字
*/

// 定义structure
typedef struct {
    char *name;
    char *title;
    char *ssnum;
    double salary;
    int withholding;
} employeeRecordT;



void main() {
    // 声明结构体变量
    employeeRecordT empRc;

    // record selection: empRc.name;

    // 初始化
    empRc.name = "Ebenezer Scrooge";
    empRc.title = "Partner";
    empRc.ssnum = "271-82-8183";
    empRc.salary = 250.00;
    empRc.withholding = 1;

    // 指针与record
     employeeRecordT *empPtr;
     empPtr = &empRc;

    // 指针如何访问record里面的field
    // 方式1:
    (*empPtr).name; // 注意.的优先级高于*
    // 方式2:因为方式1每次都要加括号比较麻烦,所以引入了->操作符
    empPtr->name;

}

二、英语总结
1.payroll是什么意思?
答:payroll: pay+ roll:total amount paid to employees over a period(工资名单,发放总额)。roll:常用作动词,但也有名词的用法:a piece of file, paper or cloth that is rolled into the shape of a tube(卷,卷轴)。
2.withholding status什么意思?
答:withhold:tv. to refuse to give back sth,隐瞒、扣留。示例:withhold information(隐瞒信息)
3.firm什么意思?
答:n. a small company(小公司)。
三、参考资料
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
3)Merrian-Webster Dictionary:https://www.merriam-webster.com
4)Collins Dictionary:https://www.collinsdictionary.com
5)Oxford Dictionary:https://www.oxfordlearnersdictionaries.com
6)The Free Dictonary:https://www.thefreedictionary.com
7)Urban Dictionary:https://www.urbandictionary.com

欢迎搜索及关注:编程人(a_codists)文章来源地址https://www.toymoban.com/news/detail-643584.html

到了这里,关于Programming abstractions in C阅读笔记:p84-p87的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • Programming Abstractions in C阅读笔记:p242-p245

    《Programming Abstractions in C》学习第67天,p242-p245总结,总计4页。 6.2小结主要讲回溯算法及递归算法在迷宫求解中应用,当然,理解然后用代码实现出来还是有些难度的。不过,这并不影响我们进行下一节6.3的学习。 答: (1)skepticism: skeptic + -ism。u. doub that sth is true or useful,怀

    2024年02月02日
    浏览(27)
  • Unix Network Programming Episode 84

    Protocol-independent UDP daytime server ‘getnameinfo’ Function This function is the complement of getaddrinfo: It takes a socket address and returns a character string describing the host and another character string describing the service. This function provides this information in a protocol-independent fashion; that is, the caller does not care what t

    2024年01月22日
    浏览(22)
  • Day 60 | 84. Largest Rectangle in Histogram

    Day 1 | 704. Binary Search | 27. Remove Element | 35. Search Insert Position | 34. First and Last Position of Element in Sorted Array Day 2 | 977. Squares of a Sorted Array | 209. Minimum Size Subarray Sum | 59. Spiral Matrix II Day 3 | 203. Remove Linked List Elements | 707. Design Linked List | 206. Reverse Linked List Day 4 | 24. Swap Nodes in Pairs| 19.

    2024年02月12日
    浏览(32)
  • 【论文阅读笔记】Endoscopic navigation in the absence of CT imaging

      上一篇的导航导论,是需要先验,也就是需要事先拍摄堆叠的图片(比如CT图等),在体外构建相应的3D模型,再与内窥镜图像进行实时匹配。对于很多情况来说,是无法拥有如此充足的先验的。所以,本文探索的是没有额外CT图像的一个内窥镜导航算法,应用场景是鼻腔

    2024年02月11日
    浏览(37)
  • Functional Programming in Kotlin – Creating Functional

    作者:禅与计算机程序设计艺术 在Kotlin中创建函数式编程并发程序是一种面向对象的编程范式,其中的一些核心概念是: immutable数据结构, 函数作为第一等公民, 协程。本文将详细阐述如何使用Kotlin构建函数式并发程序,涵盖的内容包括异步编程、并发编程、Java内存模型与K

    2024年02月06日
    浏览(29)
  • 阅读笔记2:Characterization of Metabolic Patterns in Mouse Oocytes during Meiotic Maturation

    Characterization of metabolic patterns in mouse oocytes during meiotic maturation 作者:Ling Li, Shuai Zhu, Wenjie Shu, …, Xuejiang Guo, Minjian Chen, Qiang Wang 发表期刊:Molecular Cell 发表时间:November 5, 2020 摘要解读 研究背景 : 平衡及时的代谢对于产生高质量的卵子至关重要。然而,支持卵母细胞发展的代

    2024年02月21日
    浏览(38)
  • Abandoning the Bayer-Filter to See in the Dark 论文阅读笔记

    这是CVPR2022的一篇暗图增强的文章,TCL AI Lab与福州大学,韩国延世大学,安徽大学的合作论文 网络以黑暗环境下拍摄的color raw为输入,用一个de-bayer-filter module恢复无拜尔滤波器的raw data(文章认为拜尔滤波器使得光子数量被滤去许多,无拜尔滤波器的摄像机拍摄得到的raw d

    2024年02月16日
    浏览(37)
  • 【论文阅读笔记】Sam3d: Segment anything model in volumetric medical images[

    Bui N T, Hoang D H, Tran M T, et al. Sam3d: Segment anything model in volumetric medical images[J]. arXiv preprint arXiv:2309.03493, 2023.【开源】 本文提出的SAM3D模型是针对三维体积医学图像分割的一种新方法。其核心在于将“分割任何事物”(SAM)模型的预训练编码器与一个轻量级的3D解码器相结合。与

    2024年01月20日
    浏览(36)
  • K8s in Action 阅读笔记——【13】Securing cluster nodes and the network

    Pod中的容器通常在不同的Linux名称空间下运行,这使得它们的进程与其他容器或节点默认名称空间下运行的进程隔离开来。 例如,我们学习到每个Pod都拥有自己的IP和端口空间,因为它使用其自己的网络名称空间。同样,每个Pod也拥有自己的进程树,因为它有自己的PID名称空

    2024年02月11日
    浏览(32)
  • K8s in Action 阅读笔记——【14】Securing cluster nodes and the network

    迄今为止,创建了 Pod 而不考虑它们允许消耗多少 CPU 和内存。但是,正如将在本章中看到的那样,设置 Pod 预期消耗和允许消耗的最大数量是任何 Pod 定义的重要部分。设置这两组参数可以确保 Pod 只占用 Kubernetes 集群提供的资源中的份额,并且还影响 Pod 在集群中的调度方式

    2024年02月08日
    浏览(30)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包