Jadual Kandungan
urutan................................................. ................................................... ............... ................................... .............................. .5
Kata pengantar........................................ ......... ................................................... ...... ................................................ .....7
Ucapan terima kasih................................................. ....... .............................................. ...................... ................................ ............9
Bab 1 Gambaran Keseluruhan Bahasa C/C++............................................ .. ................................................... ............. .............10
1.1 Kerangka asas program...................................... ...... ................................................... ......... ............10
1.2 Pembolehubah............................................ ........ ................................................... ....... ............................11
1.2.1 Definisi pembolehubah............................................ .... ................................................... .......... .............11
1.2.2 Penetapan pembolehubah............................................ .... ................................................ ................... .............11
1.2.3 Rujukan kepada pembolehubah............................................ .... ................................................... .......... .............12
1.3 Jenis data bahasa C/C++............................................ .. ................................................... ............. .......12
1.4 Pemalar................................................ ................................................... ............... ........................14
1.5 Pengendali dan ungkapan............................................ ...... ................................................... ......... .............15
1.5.1 Pengendali aritmetik................................................. ... ................................................... .................. .............15
1.5.2 Pengendali tugasan .............................................. ... ................................................... .................. .............17
1.5.3 Pengendali perhubungan................................................. ... ................................................... .................. .............17
1.5.4 Operator logik................................................ ... ................................................... .................. ............17
1.5.5 Operator bit............................................ ..... ................................................... .......... .............18
1.6 Nota................................................ ................ ................................. .............................. ................... .....22
1.7 Penyata cawangan .............................................. ................................................. ................ ........................23
1.7.1 jika penyataan .............................................. ... ................................................... .................. .............23
1.7.2 penyataan suis............................................ ... ................................................... .................. .......24
1.8 Penyataan gelung .............................................. ................................................. ................ ............................26
1.8.1 untuk penyataan................................................ ... ................................................... .................. .............27
1.8.2 manakala penyataan ............................................ ... ................................................... .................. ............28
1.8.3 penyataan do-sambil...................................... ..... ................................................... .......... .......28
1.8.4 penyataan putus............................................ ... ................................................... .................. ............29
1.8.5 sambung penyataan............................................ ... ................................................... .................. .........30
1.9 Fungsi................................................... ...... ................................................ ..................... ........................30
1.9.1 Definisi fungsi............................................ .... ................................................... .......... .............31
1.9.2 Panggilan fungsi........................................ ..... ................................................... .......... .............32
1.9.3 Nilai hantaran dan pulangan parameter................................ .......... ................................................... ..... ...32
1.9.4 Fungsi perpustakaan dan fail pengepala............................................ .. ................................................... ............. .......33
1.10 Input dan keluaran standard............................................ ....... ................................................... ........ .............33
1.10.1 fungsi printf (fungsi output standard)............................................. ...................................34
1.10.2 fungsi imbasan (fungsi input standard) ........................................ ...................................35
1.11 Pembolehubah global dan pembolehubah tempatan............................................ .... ................................................... .......... ......35
1.12 Tatasusunan................................................ ................................................... ............... ........................37
1.12.1 Tatasusunan satu dimensi............................................. ..... ................................................... .................... ............37
1.12.2 Tatasusunan dua dimensi............................................. ..... ................................................... .................... ............39
1.12.3 Permulaan tatasusunan............................................ .... ................................................ ................... ........40
1.12.4 Susunan di luar sempadan............................................ ... ................................................... ............ .............41
1.13 Rentetan................................................... ................................................... ............... ........................41
Kenyataan:
Semua sumber di laman web ini disumbangkan dan diterbitkan oleh netizen, atau dicetak semula oleh tapak muat turun utama. Sila semak integriti perisian itu sendiri! Semua sumber di laman web ini adalah untuk pembelajaran dan rujukan sahaja. Tolong jangan gunakannya untuk tujuan komersial, jika tidak, anda akan bertanggungjawab untuk semua akibat yang ditanggung! Jika terdapat sebarang pelanggaran, sila hubungi kami untuk memadam dan mengalih keluarnya. Maklumat hubungan: admin@php.cn