热搜关键词: 电路基础ADC数字信号处理封装库PLC

pdf

c缺陷与陷阱

  • 1星
  • 2022-01-19
  • 495.93KB
  • 需要3积分
  • 6次下载
标签: C语言

C语言

Andrew  Koenig  著  2002年出版

C语言设计常见陷阱和缺陷预防

Andrew Koenig
C
2002
10
....................................................................................................................................3
....................................................................................................................................3
............................................................................................................................................4
............................................................................................................................................5
”................................................................................................................7
5.1 =
==.......................................................................................................................8
5.2 & |
&& || ..........................................................................................................9
5.3
”...........................................................................................10
5.4
.......................................................................................................................11
5.5
...............................................................................................................11
6
”............................................................................................................12
6.1
...............................................................................................................12
6.2
...................................................................................................15
6.3
...................................................................................18
6.4 switch
....................................................................................................................20
6.5
.......................................................................................................................21
6.6
”else
.............................................................................................21
7
”............................................................................................................23
7.1
...................................................................................................................23
7.2
...............................................................................................................27
7.3
...................................................................................................28
7.4
”...........................................................................................................29
7.5
...................................................................................................30
7.6
...............................................................................................31
7.7
.......................................................................................................................39
7.8
&& || !..........................................................................................................40
7.9
.......................................................................................................................41
7.10
main
...........................................................................................41
8
............................................................................................................................43
8.1
...............................................................................................................43
8.2
...................................................................................................................44
8.3
static
............................................................................................45
8.4
...................................................................................................46
8.5
...............................................................................................................50
8.6
...........................................................................................................................52
9
........................................................................................................................53
9.1
getchar
.............................................................................................54
9.2
...............................................................................................................54
9.3
...................................................................................................56
9.4
errno
....................................................................................................57
9.5
signal ................................................................................................................58
10
..................................................................................................................59
10.1
.........................................................................................60
10.2
.............................................................................................................60
1
2
3
4
5
1
Andrew Koenig
C
2002
10
.............................................................................................................63
.....................................................................................................64
11
..........................................................................................................65
11.1
C
................................................................................................65
11.2
.....................................................................................................67
11.3
.................................................................................................................68
11.4
.........................................................................68
11.5
.................................................................................................................69
11.6
0..................................................................................................................69
11.7
.............................................................................................70
11.8
.............................................................................................................71
11.9
.................................................................................................................71
11.10
.......................................................................................73
12
..............................................................................................................76
12.1
.............................................................................................................................77
12.2
.............................................................................................................................79
13
A PRINTF VARARGS STDARG......................................................................79
14
B Koenig Moo
......................................................................................79
10.3
10.4
2
Andrew Koenig
C
2002
10
1
1985
c
c
8
C
c
c
Bell
C
2
c
C
C
c
!
C
14
!
C
Andrew Koenig
2002
10
3
Andrew Koenig
C
2002
10
3
!
)
AT&T
I
C
1985
!
(
c
2 000
)
c
10
1977
“PL/I
SHARE(IBM
PL
C
C
c
C
C
10
C
C
Bug!
C
(
Kemighan
Ritchie The C Programming
Language
2
Prentice—Hall 1988)
C
( Harbison Steele
C: A Reference Manual
2
Prentice—Halt 1987)
(
VanWyk Data Structures And C Programs Addison—Wesley 1988)
( Horton How To WritePortable Programs In C Prentice—Hall 1989)
( Kemighan Pike The UnixProgramming Environment Prentice—Hall 1984)
(
4
Andrew Koenig
C
2002
10
C
Feuer TheCPuzzleBook Prentice—Hall 1982)
C
Addison.Wesley
ANSI C
ANSI C
“ANSI
C
ANSI C
ANSl
C
C
ANSI
C
ANSl
ANSI
C
C
SteveBellovin(6.3
) MarkBrader(1.1
) Luca Cardelli(4.4
)
LarryCipriani(2.3 ) GuyHarris andSteve Johnson(2.2 ) Phil Karn(2.2 ) Dave Kristol C7.5
) George W Leach(1.1 ) Doug Mcllroy (2.3 ) BarbaraMoo(7.2 ) RobPike(1.1 )
JimReeds(3.6 ) Dennis Ritchie(2.2 ) JanetSirkis(5.2 ) Richard Stevens(2.5 ) Bjarne
Stroustrup (2.3 ) ,Ephraim Vishnalc(1.4 )
(2.3 )
Steve Bellovin
Jim Coplien
Marc Donner
Jon Forrest Brian Kernighan Doug Mcllroy Barbara M00.Rob Murray Bob Richton Dennis
Ritchie Jonathan Shapir0
Lee McMahon Ed Sitar
Dave Prosser
ANSI C
Brian Kernighan
Addison-Wesley
Jim DeWolf Mary Dyer Lorraine
Ferrier Katherine Harutunian Marshall Henrichs Debbie Lafferty Keith Wollman
Helen
Wythe
AT&T
Steve Chappell Bob Factor Wayne Hunt Rob Murray Will Smith.Dan Stanzione
Eric Sumner
Robert Sbeckley
The People Trap and Other
Pitfalls Snares Devices and Delusions(as well as Two Sniggles and a Contrivance)(1968
Dell Books
)
4
1966
Fortran
5
展开预览

文档解析

这份文件是Andrew Koenig所著的关于C语言编程的书籍,出版于2002年10月。书中深入探讨了C语言的多个高级主题,包括但不限于条件运算符、循环、数组、指针、函数、预处理器指令、变量作用域、内存分配以及错误处理等。作者通过详细的代码示例和讨论,展示了C语言的强大功能和编程技巧。此外,书中还涉及了C语言与其他编程语言的比较,如Fortran、Pascal和Ada,以及C语言的标准化过程和可移植性问题。通过阅读这本书,读者可以更深入地理解C语言的内部机制和最佳实践,提高编程能力和解决复杂问题的方法。

猜您喜欢

评论

登录/注册

意见反馈

求资源

回顶部

推荐内容

热门活动

热门器件

随便看看

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved
×