The C Programming Language

Brian W. Kernighan, Dennis M. Ritchie

出版社

Prentice Hall

出版时间

1988-04-01

ISBN

9780131103627

评分

★★★★★
书籍介绍
Presents a complete guide to ANSI standard C language programming. Written by the developers of C, this new version helps readers keep up with the finalized ANSI standard for C while showing how to take advantage of C's rich set of operators, economy of expression, improved control flow, and data structures. This 2nd edition has been completely rewritten with additional examples and problem sets to clarify the implementation of difficult language constructs. 7 x 9 1/4.
AI导读
核心看点
  • C语言之父亲笔撰写,定义K&R C标准
  • 极简主义写作风格,无废话,字字珠玑
  • 结合Unix环境,深入解析标准库函数实现
适合谁读
  • 具备基础编程概念,欲深入理解C语言的开发者
  • 追求代码简洁优雅,希望提升编程内功的程序员
  • 计算机专业学生及准备考研的准研究生
读前提醒
  • 零基础新手建议先读国内教材建立基本概念
  • 务必在Linux环境下动手完成书中所有习题
  • 不要只看不练,需结合实践消化抽象概念
读者共识
  • 计算机科学领域经久不衰的传奇经典教材
  • 内容精炼震撼,被誉为无法删减的教科书
  • 虽薄却重,是检验程序员功力的试金石

本导读基于书籍简介、目录、原文摘录、短评和书评生成,不等同于全文精读。

精彩摘录
  • ""相对于#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"
作者简介
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.
用户评论
找了个英文版的PDF,希望这个暑假能读完。
虽然已经学过C,但是这本仍然值得仔细阅读,讲得非常清楚,解释的都是非常核心的概念。而且例子写得非常用心,将标准库函数中常见的函数实现都给出讲解。习题对初学者略难,可以参看习题解答一书作为补充。
不管是入門或是老手,都值得一看!!! 繁體中譯本公推淡江的冼鏡光老師翻譯的最好,不過因為未經授權發行,目前已經絕版了。
第二次考研时,在石家庄铁道大学的图书馆遇见你,人生一下变得晴朗了。
我不配给它打星。
建议全文背诵
我不觉得适合初学者。或者说,适合那些还没有受其他语言影响的初学者。作者用得 C 标准也和更现代的 C 不一样。这本书看完是很快的,C 的语法本身也简单。书上的习题反而非常硬核,大多都是在实现那些 Unix 基本工具的雏形,比如 ls, cat 等等……值得经常参阅,品味简洁而不简单的朴素真理。
写完200行代码就可以开撸这本神书了
It’s a masterpiece. Complete. Comprehensive.
写C的多多少少得看过。
下载
收藏