C程序设计语言(原书第2版)

[美] Brian W. Kernighan

出版时间

2019-03-31

ISBN

9787111617945

评分

★★★★★
书籍介绍
被无数读者称为“C语言圣经”的这本薄薄小册子,恰恰是它最容易被轻视、也最容易被低估的地方。它简洁干练,几个小时就能“读完”,但真正让人反复翻回的,是那句“因为简单所以难得”。许多读者最初嫌它太简单,回头才惊觉自己严重低估了它——指针的灵活、结构体的精妙、标准库的设计哲学,都需要反复练习才能吃透。它不是一本让你一次性“学会”C的书,而是一把能陪你多年、越用越厚的钥匙:初读觉得浅,重读才见深。适合那些愿意把书里的代码亲手敲一遍、愿意为指针和数据类型反复琢磨的人。它真正的价值,不在篇幅,而在每一处都经得起回味的克制与精确。
作者简介
Brian W. Kernighan 是贝尔实验室计算科学研究中心高级研究人员。他参加了UNIX系统、C语言、AWK语言和许多其他系统的开发,同时出版了许多在计算机领域具有影响的著作。 Dennis M.Ritchie 于1967年加入贝尔实验室,曾任该实验室计算科学研究中心系统软件研究部主任。他和 Ken L. Thompson 共同设计并实现的C语言改变了程序设计语言发展的轨迹,是程序设计语言发展过程中的一个重要里程碑。与此同时,他们两人还设计并实现了UNIX操作系统。正是由于这两项巨大贡献,Dennis M. Ritchie 于1983年获得了计算机界的最高奖——图灵奖。此外,他还获得了ACM、IEEE、贝尔实验室等授予的多种奖项。
AI导读
核心看点
  • C语言设计者亲笔撰写,编程界经典圣经
  • 内容精炼极致,字字珠玑,无冗余废话
  • 首次引入Hello World,奠定编程入门传统
读者共识
  • 篇幅短小精悍,但信息密度极大,需反复研读
  • 风格简洁干练,是检验编程功力的试金石
  • 虽薄却难,适合有一定基础后回头重读品味
精彩摘录
  • ""相对于#define语句来说,它的优势在于常量值可以自动生成。尽管可以声明enum类型的变量,但编译器不检查这种类型的变量中存储的值是否为该枚举的有效值。不过,枚举变量提供这种检查,因此枚举比#define更具优势。此外,调试程序可以以符号形式打印出枚举变量的值";"
  • "If a name that has not been previously declared occurs in an expression and is followed by a left parenthesis, it is declared by context to be a function name, the function is assumed to return an int, and nothing is assumed about its arguments. Furthermore, if a function declaration does not includ"
  • "float类型通常是32位,它至少有6位有效数字,取值范围一般在10^-38 ~ 10 ^ 38之间"
  • "BCPL and B are "typeless" languages. By contrast, C provides a variety of data types. The fundamental types are characters, and integers and floating-point numbers of several sizes. In addition, there is a hierarchy of derived data types created with pointers, arrays, structures, and unions. Express"
  • "Right shifting a signed quantity will fill sign bits ("arithmetic shift") or on some machines ans with 0-bits ("logical shift") on others"
  • "Declaring the argument x to be unsigned ensures that when it is right-shifted, vacated bits will be filled with zeros, not sign bits, regardless of the machine the program run on."
  • "char *fgets(char *line, int maxline, FILE *fp) fgets reads the next input line (including the newline) from file fp into the character array line; at most maxline-1 characters will be read. The resulting line is terminated with '\0'. Normally fgets returns line; on end of file or error it returns NU"
  • "void *realloc(void *p, size_t size) realloc changes the size of the object pointed to by p to size. The contents will be unchanged up to the minimum of the old and new sizes. If the new size is larger, the new space is uninitialized. realloc returns a pointer to the new space, or NULL if the request"
目录
出版者的话
中文版序
译者序
校译者简介
第2版前言

显示全部
用户评论
为复习C而读,没想到收货这么大。非常优秀的作品,真的是字字珠玑,有需要还要多翻几遍。另外,指针是真灵活啊,能干的事情真多。
简洁干练,几个小时就可以读完
个人感觉: 翻译和内容,都不如 Primer Plus
之前只是随便翻过,还觉得这本书写的太简单直接了,现在真是发现严重低估了这本书
因为简单所以难得
基础书。
下载
收藏