目 錄
序................................................. .................................................. .................................................. .5
前言................................................. .................................................. ................................................7
致謝................................................. .................................................. ................................................9
第一章C/C 語言概述.......................................... .................................................. ....................10
1.1 程序的基本架構............................................. .................................................. ..............10
1.2 變項................................................ .................................................. ................................11
1.2.1 變數的定義...................................... .................................................. ...........11
1.2.2 變數的賦值................................................ .................................................. ...........11
1.2.3 變數的引用...................................... .................................................. ...........12
1.3 C/C 語言的資料型態.................................... .................................................. .......12
1.4 常數................................................ .................................................. ................................14
1.5 運算子和表達式............................................ .................................................. ................15
1.5.1 算術運算子................................................ .................................................. ...........15
1.5.2 賦值運算子...................................... .................................................. ...........17
1.5.3 關係運算子...................................... .................................................. ...........17
1.5.4 邏輯運算子...................................... .................................................. ..............17
1.5.5 位元運算子................................ .................................................. ..................18
1.6 註釋................................................ .................................................. ................................22
1.7 分支語句......................................... .................................................. ................................23
1.7.1 if 語句............................................. .................................................. ................23
1.7.2 switch語句............................................. .................................................. ...........24
1.8 循環語句......................................... .................................................. ................26
1.8.1 for語句............................................. .................................................. ....................27
1.8.2 while 語句............................................. .................................................. ..............28
1.8.3 do-while 語句........................................... .................................................. ..........28
1.8.4 break 語句............................................. .................................................. ..............29
1.8.5 continue 語句............................................. .................................................. ................30
1.9 函數................................................ .................................................. ................................30
1.9.1 函數的定義................................................ .................................................. ...........31
1.9.2 函數的呼叫............................................ .................................................. ...........32
1.9.3 參數傳遞與傳回值.................................... .................................................. ....32
1.9.4 函式庫函數與頭檔.................................... .................................................. .......33
1.10 標準輸入輸出.............................................. .................................................. ................33
1.10.1 printf函數(標準輸出函數)........................................ ..................................34
1.10.2 scanf函數(標準輸入函數) .................................. ..................................35
1.11 全域變數和局部變數............................................ .................................................. ......35
1.12 陣列................................................ .................................................. ...........................37
1.12.1 一維數組................................................ .................................................. ................37
1.12.2 二維數組............................................ .................................................. ................39
1.12.3 陣列的初始化............................................ .................................................. ........40
1.12.4 數組越界............................................. .................................................. ................41
1.13 字串......................................... .................................................. ................................41
陳述:
本站所有資源都是由網友投搞發佈,或轉載各大下載站,請自行檢測軟件的完整性! 本站所有資源僅供學習與參攷,請勿用於商業用途,否則產生的一切後果將由您自己承擔! 如有侵權請聯繫我們删除下架,聯繫方式: admin@php.cn