The C Programming Language

Brian W. Kernighan, Dennis M. Ritchie

出版社

Prentice Hall

出版时间

1988-04-01

ISBN

9780131103627

评分

★★★★★
书籍介绍
这本书由C语言两位创造者亲笔撰写,却极少有人把它当作工具书来用。真正让读者反复翻开的,是它近乎克制的写作方式:没有冗长的术语堆砌,概念在精炼的例子里自然浮现,许多经典的代码片段至今仍是业界范本。不少读者正是为了查缺补漏而翻开,最终却在简洁的叙述中重新理解了指针、类型系统与内存运算的本质。它被奉为C语言的入门首选,也常被拿来反复精读——有人为它痛哭,有人读第二遍时仍收获颇丰。它适合那些愿意慢下来、把每个例子嚼透的人;若只求速成,或许会错过它真正的分量。
作者简介
Brian W. Kernighan works in the Computing Science Research Center at Bell Laboratories, Lucent Technologies. He is Consulting Editor for Addison-Wesley's Professional Computing Series and the author, with Dennis Ritchie, of The C Programming Language. Dennis Ritchie is a computer scientist notable for his influence on ALTRAN, B, BCPL, C, Multics, and Unix.
AI导读
核心看点
  • C语言之父亲笔撰写,定义K&R C标准
  • 极简主义写作风格,无废话,字字珠玑
  • 结合Unix环境,深入解析标准库函数实现
读者共识
  • 计算机科学领域经久不衰的传奇经典教材
  • 内容精炼震撼,被誉为无法删减的教科书
  • 虽薄却重,是检验程序员功力的试金石
精彩摘录
  • ""相对于#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"
用户评论
找了个英文版的PDF,希望这个暑假能读完。
虽然已经学过C,但是这本仍然值得仔细阅读,讲得非常清楚,解释的都是非常核心的概念。而且例子写得非常用心,将标准库函数中常见的函数实现都给出讲解。习题对初学者略难,可以参看习题解答一书作为补充。
不管是入門或是老手,都值得一看!!! 繁體中譯本公推淡江的冼鏡光老師翻譯的最好,不過因為未經授權發行,目前已經絕版了。
第二次考研时,在石家庄铁道大学的图书馆遇见你,人生一下变得晴朗了。
我不配给它打星。
建议全文背诵
我不觉得适合初学者。或者说,适合那些还没有受其他语言影响的初学者。作者用得 C 标准也和更现代的 C 不一样。这本书看完是很快的,C 的语法本身也简单。书上的习题反而非常硬核,大多都是在实现那些 Unix 基本工具的雏形,比如 ls, cat 等等……值得经常参阅,品味简洁而不简单的朴素真理。
写完200行代码就可以开撸这本神书了
It’s a masterpiece. Complete. Comprehensive.
写C的多多少少得看过。
下载
收藏