關(guān)于我們
書單推薦
新書推薦
|
C 語言從新手到高手
全書共分為九章,主要介紹了滾動軸承故障軌邊聲學診斷系統(tǒng)(TADS)的應(yīng)用背景、構(gòu)成及工作原理、使用方法、運用管理、設(shè)備性能、故障案例等六個方面的內(nèi)容,其中包括軌邊設(shè)備、聯(lián)網(wǎng)檢測、客車貨車動車TADS系統(tǒng)的運用管理、設(shè)備廠家維護等方面的知識。本書著重講述了TADS的工作原理與操作方法,并配以大量的界面圖說明,簡明直觀,便于讀者掌握,具有很強的實用性和針對性。
關(guān)淞元:畢業(yè)于吉林大學計算機科學與技術(shù)學院,碩士學歷,*架構(gòu)*,有10余年系統(tǒng)架構(gòu)設(shè)計,軟件開發(fā)以及研發(fā)管理經(jīng)驗;曾發(fā)表過多篇學術(shù)論文以及專利,主要涉及數(shù)字通信領(lǐng)域、網(wǎng)絡(luò)安全領(lǐng)域、移動通信領(lǐng)域以及安全領(lǐng)域;尤其擅長C語言算法及性能優(yōu)化,曾主持或參與過NGFW(下一代防火墻)的研發(fā)、IPS(入侵檢測系統(tǒng))的研發(fā),DDOS(分布式拒絕攻擊)的架構(gòu)設(shè)計和研發(fā)、DPI(深度報文檢測)的架構(gòu)設(shè)計和研發(fā),內(nèi)容還原的架構(gòu)設(shè)計和研發(fā)等。目前在某公司出任*席架構(gòu)師,主持國外大型安全項目的總體架構(gòu)設(shè)計,以及國jiabuwei項目的總體架構(gòu)設(shè)計。 第 1 章 C 語言概述
1.1 C 語言的前世今生............................................................................................... 2
1.2 C 語言的優(yōu)勢與劣勢........................................................................................... 3
1.3 C 語言的當前標準............................................................................................... 4
1.4 C 語言的編程機制............................................................................................... 4
第2 章 C 語言的骨骼——基礎(chǔ)數(shù)據(jù)類型
2.1 常量與變量........................................................................................................... 6
2.1.1 常量.......................................................................................................... 6
2.1.2 變量.......................................................................................................... 8
2.2 關(guān)鍵字和保留標識符.......................................................................................... 9
2.3 整數(shù)類型............................................................................................................. 11
2.4 浮點類型............................................................................................................. 11
2.5 字符和字符串類型............................................................................................13
2.6 類型之間的轉(zhuǎn)換................................................................................................14
2.7 程序注釋.............................................................................................................18
第3 章 C 語言的肉身——運算符
3.1 算術(shù)運算符.........................................................................................................20
3.2 賦值運算符.........................................................................................................213.3 邏輯運算符.........................................................................................................21
3.4 移位運算符.........................................................................................................22
3.5 關(guān)系運算符.........................................................................................................23
3.6 增量運算符.........................................................................................................24
3.7 位運算符.............................................................................................................25
3.8 條件運算符.........................................................................................................26
3.9 逗號運算符.........................................................................................................27
3.10 運算符的優(yōu)先級..............................................................................................28
第4 章 C 語言的血液——控制流
4.1 順序流.................................................................................................................30
4.2 條件分支流.........................................................................................................31
4.3 循環(huán)控制流.........................................................................................................35
4.4 輸入輸出流.........................................................................................................38
4.4.1 scanf/printf 函數(shù).....................................................................................38
4.4.2 getchar/putchar 函數(shù)..............................................................................40
4.4.3 gets/puts 函數(shù).........................................................................................41
4.5 語句嵌套.............................................................................................................42
第5 章 C 語言的靈魂——函數(shù)
5.1 函數(shù)定義.............................................................................................................44
5.2 函數(shù)聲明.............................................................................................................45
5.3 函數(shù)參數(shù).............................................................................................................46
5.4 函數(shù)調(diào)用.............................................................................................................48
5.5 函數(shù)遞歸.............................................................................................................52
5.6 可變參數(shù)列表.....................................................................................................54
第6 章 丫丫學步——構(gòu)建*個程序
6.1 main 函數(shù)............................................................................................................56
6.2 程序風格.............................................................................................................58
6.3 *個C 程序....................................................................................................60
6.4 編譯執(zhí)行.............................................................................................................61*篇 進階篇
第 7 章 成長的煩惱——數(shù)組和指針
7.1 一維數(shù)組.............................................................................................................64
7.2 多維數(shù)組.............................................................................................................65
7.3 變長數(shù)組.............................................................................................................66
7.4 指針與地址.........................................................................................................68
7.5 指針數(shù)組.............................................................................................................71
7.6 指向函數(shù)的指針................................................................................................73
7.7 指向指針的指針................................................................................................74
7.8 指針和數(shù)組的區(qū)別............................................................................................75
第8 章 成長的積累——結(jié)構(gòu)體、聯(lián)合體及其他數(shù)據(jù)形式
8.1 結(jié)構(gòu)體基礎(chǔ)知識................................................................................................77
8.2 結(jié)構(gòu)的存儲與對齊............................................................................................79
8.3 結(jié)構(gòu)數(shù)組.............................................................................................................84
8.4 指向結(jié)構(gòu)的指針................................................................................................85
8.5 結(jié)構(gòu)體自引用.....................................................................................................87
8.6 聯(lián)合體基礎(chǔ)知識................................................................................................88
8.7 枚舉類型.............................................................................................................90
8.8 位字段.................................................................................................................93
8.9 typedef 簡介........................................................................................................95
第9 章 成長的驚喜——預處理器
9.1 宏定義.................................................................................................................98
9.2 文件包含...........................................................................................................102
9.3 條件編譯...........................................................................................................103
第10 章 成人禮——*次構(gòu)建多文件工程
10.1 多源文件編譯................................................................................................107
10.2 動態(tài)庫和靜態(tài)庫............................................................................................ 11310.2.1 靜態(tài)庫................................................................................................ 114
10.2.2 動態(tài)庫................................................................................................ 115
第三篇實戰(zhàn)篇
第 11 章 骨骼的發(fā)育——經(jīng)典數(shù)據(jù)結(jié)構(gòu)
11.1 棧.....................................................................................................................120
11.2 鏈表.................................................................................................................123
11.3 隊列.................................................................................................................126
11.4 樹.....................................................................................................................129
11.5 堆.....................................................................................................................134
11.6 散列表.............................................................................................................137
11.7 圖.....................................................................................................................139
11.7.1 鄰接矩陣............................................................................................141
11.7.2 鄰接表................................................................................................142
11.7.3 十字鏈表............................................................................................142
11.7.4 鄰接多重表........................................................................................143
11.8 一個具體的例子——協(xié)議識別引擎............................................................144
第12 章 社會經(jīng)驗的積累——經(jīng)典設(shè)計模式
12.1 程序設(shè)計理念................................................................................................151
12.2 設(shè)計模式原則................................................................................................152
12.3 單件模式.........................................................................................................154
12.4 工廠模式.........................................................................................................157
12.5 抽象工廠模式................................................................................................158
12.6 創(chuàng)建者模式.....................................................................................................161
12.7 原型模式.........................................................................................................162
12.8 適配器模式.....................................................................................................163
12.9 裝飾器模式.....................................................................................................164
12.10 代理模式.......................................................................................................166
12.11 外觀模式.......................................................................................................167
12.12 橋接模式.......................................................................................................169
12.13 組合模式.......................................................................................................170
目 錄 V
12.14 享元模式.......................................................................................................172
12.15 策略模式.......................................................................................................174
12.16 模板方法模式..............................................................................................175
12.17 觀察者模式...................................................................................................177
12.18 迭代器模式...................................................................................................179
12.19 責任鏈模式...................................................................................................180
12.20 命令模式.......................................................................................................182
12.21 備忘錄模式...................................................................................................183
12.22 狀態(tài)模式.......................................................................................................185
12.23 訪問者模式...................................................................................................186
12.24 中介者模式...................................................................................................188
12.25 解釋器模式...................................................................................................190
第13 章 成長的挫折——再論程序調(diào)試
13.1 斷言.................................................................................................................194
13.2 *的打印.....................................................................................................197
13.3 GDB 調(diào)試淺談...............................................................................................199
13.3.1 基礎(chǔ)命令............................................................................................199
13.3.2 進階多線程命令................................................................................205
13.3.3 調(diào)試core 文件...................................................................................206
13.4 符號表與反匯編............................................................................................210
13.5 core 文件的配置.............................................................................................212
第14 章 適應(yīng)社會——可移植性
14.1 為什么需要可移植........................................................................................214
14.2 如何設(shè)計可移植的數(shù)據(jù)結(jié)構(gòu)........................................................................215
14.3 如何設(shè)計可移植的程序................................................................................217
第四篇高手篇
第 15 章 找出自身的不足——性能調(diào)試
15.1 程序Cycle 的意義.........................................................................................220
VI C 語言從新手到高手
15.2 性能測試工具的使用....................................................................................221
15.3 變量的優(yōu)化.....................................................................................................224
15.4 高性能函數(shù).....................................................................................................228
15.5 嵌入式匯編.....................................................................................................234
15.6 編譯優(yōu)化.........................................................................................................237
第16 章 做事需未雨綢繆——Cache 技術(shù)
16.1 為什么要使用Cache .....................................................................................241
16.2 Cache 有多少級.............................................................................................242
16.3 Cache Line 的介紹.........................................................................................244
16.4 與Cache 結(jié)合的CPU 指令..........................................................................246
16.5 Cache 的淘汰策略.........................................................................................250
16.6 讓程序愛上Cache .........................................................................................252
第17 章 找到親近的人與事——NUMA 技術(shù)
17.1 NUMA 簡介...................................................................................................254
17.2 NUMA 存儲管理...........................................................................................257
17.3 NUMA 相關(guān)工具...........................................................................................258
17.4 NUMA 讀寫實測...........................................................................................260
17.5 讓程序愛上NUMA.......................................................................................261
第18 章 社會更新?lián)Q代——大頁技術(shù)
18.1 大頁簡介.........................................................................................................262
18.2 Linux 如何配置大頁......................................................................................263
18.3 簡述Hugetlbfs 實現(xiàn).......................................................................................266
18.4 程序如何使用大頁........................................................................................269
第19 章 自我修煉——多線程技術(shù)
19.1 進程與線程的區(qū)別........................................................................................271
19.2 多線程編程.....................................................................................................275
19.2.1 線程的創(chuàng)建和結(jié)束............................................................................275
19.2.2 線程同步............................................................................................277
目 錄 VII
19.2.3 線程互斥............................................................................................281
19.2.4 定義線程獨有變量............................................................................283
19.3 CPU 親和性....................................................................................................284
19.3.1 RTC 模式............................................................................................287
19.3.2 Pipeline 模式......................................................................................288
19.4 多線程調(diào)試.....................................................................................................289
附錄A 術(shù)語表
附錄 B 操作符優(yōu)先級表
附錄 C Linux 信號表
你還可能感興趣
我要評論
|