The  C Programming Language

The C Programming Language

作者:Brian W. Kernighan

出版社:Prentice Hall

出版年:1988-4-1

评分:9.6

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.

作者简介

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.

精彩摘录

"相对于#define语句来说,它的优势在于常量值可以自动生成。尽管可以声明enum类型的变量,但编译器不检查这种类型的变量中存储的值是否为该枚举的有效值。不过,枚举变量提供这种检查,因此枚举比#define更具优势。此外,调试程序可以以符号形式打印出枚举变量的值";

——引自第1页


Ifanamethathasnotbeenpreviouslydeclaredoccursinanexpressionandisfollowedbyaleftparenthesis,itisdeclaredbycontexttobeafunctionname,thefunctionisassumedtoreturnanint,andnothingisassumedaboutitsarguments.Furthermore,ifafunctiondeclarationdoesnotincludearguments,asindoubleatof();thattooistakentomeanthatnothingistobeassumedabouttheargumentsofatof;allparametercheckingisturnedoff.ThisspecialmeaningoftheemptyargumentlistisintendedtopermitolderCprogramstocompilewithnewcompilers.Butit’sabadideatouseitwithnewprograms.Ifthefunctiontakesarguments,declarethem;ifittakesnoarguments,usevoid.

——引自第72页

相关推荐

微信二维码