C程式設計基礎(英文版)

C程式設計基礎(英文版)

《C程式設計基礎(英文版)》是電子工業出版社出版的圖書,作者是汪芳 等。

基本介紹

  • 中文名:C程式設計基礎(英文版) 
  • 作者:汪芳 等
  • 出版時間:2023年7月
  • 出版社:電子工業出版社
  • 頁數:276 頁
  • 字數:496千字
  • ISBN:9787121459771
  • 開本:16 開
內容簡介,圖書目錄,

內容簡介

編程技術是信息技術中最重要的技能和工具之一,它是連線信息和計算機的橋樑。掌握並熟練使用程式語言已成為所有大學生必備的技能。 C語言是高級程式語言的先驅,也是最重要和最流行的語言之一。本書的目標是引導初學者進入程式設計的殿堂,內容涉及編程基礎知識包括運算符和表達式、數據輸入和輸出、選擇結構、循環結構、數組、函式、指針、結構體、鍊表和檔案讀寫等。主要側重於C語言的基本語法和編程的基本技能。我們將通過大量簡潔的程式示例指導您構建編程思維並編寫程式。本書旨在幫助學生掌握C語言編程技能,並為其他課程奠定基礎,如C++、數學建模、作業系統、計算機圖形學、系統仿真等。本書既可以作為大學本科計算機專業和非計算機專業的程式設計基礎課程教材,也可以用作大專院校授課教材,亦是一本不可多得的自學教材。

圖書目錄

Chapter 1 Introducing C 1
1.1 Why programming is important 1
1.2 Why C 2
1.3 History of C 3
1.4 Strengths and Weaknesses of C 4
1.5 How to learn C? 6
1.5.1 Code::Blocks 6
1.5.2 XCODE 13
1.5.3 online compiler 16
1.5.4 How to sign in to ICOURSE (MOOC) and XUETANG 17
1.5.5 Can’t find GNU GCC Compiler 20
1.5.6 I can’t debug 21
quiz 1. 23
Chapter 2 Data Types and Expressions 24
2.1 The General Form of a Simple Program 24
2.2.1 The General Form 27
2.2.2 Variables and Assignment 31
2.2 Character set and Keywords 33
2.2.1 Character set 33
2.2.2 Keywords 34
2.2.3 Identifiers 34
2.3 Data Types 35
2.3.1 integer types 37
2.3.2 floating types 38
2.3.3 Character types 39
2.3.4 void type 41
2.3.5 Variables 42
2.4 Constants and Variables 45
2.4.1 Constants 45
2.5 Operators and Expressions 50
2.5.1 Arithmetic Operators 52
2.5.2 Assignment Operators 54
2.5.3 Increment and Decrement Operators 57
2.5.4 The sizeof Operator 58
2.5.5 The Comma Operator 59
2.5.6 The conditional operator 59
2.5.7 Bitwise Operators 60
2.5.8 Expression Statement 61
2.5.9 Type Conversion 61
quiz 2. 63
Chapter 3 Program control structure 64
3.1 Statement 64
3.2 Input and output 65
3.2.1 Single Character Input/output 66
3.2.2 Formatted Input and Output 68
3.2 The scanf Function 83
3.3 The sequence structure 92
3.4 The selection structure 95
3.4.1 Relational Expressions 97
3.4.2 Logical Expressions 99
3.4.3 The if Statement 102
3.4.5 The switch Statement 112
3.5 The loop structure 119
3.5.1 While loop 120
3.5.2 do while loop 124
3.5.3 for loop 129
3.5.4 Exiting from a Loop 133
Quiz 3 137
Chapter 4 The Preprocessor 141
4.1 Preprocessor Directives 141
4.2 Macro Definitions 142
4.3 File Inclusion 145
Quiz 4 146
Answer 4 146
Chapter 5 Arrays 147
5.1 One-Dimensional Arrays 147
5.1.1 The declaration of a one-dimensional array 147
5.1.2 Access array elements 149
5.1.3 Index 150
5.1.4 Initialization 151
5.1.5 Variable-Length Arrays 152
5.2 Multidimensional Arrays 152
5.2.1 Declaration of a two-dimensional array 152
5.2.2 Variable-Length 2D arrays 154
5.2.3 Initializing a 2D Array 157
5.2.4 Application of the 2D Array 157
Quiz 5. 158
Answer 158
Chapter 6 Functions 160
6.1 Introduction 160
6.2 Defining and Calling Functions 162
6.3 Arguments 168
6.4 The return Statement 170
6.5 Declaration 175
6.6 Array arguments 176
6.7 Recursion 179
6.8 Sort algorithm 180
6.9 Program Organization 188
6.9.1 Scope 188
6.9.2 Local variables and Global variables 189
Quiz 6 195
Answer 196
Chapter 7 Pointers 197
7.1 Pointer Variables 197
7.2 The Address and Indirection Operators 198
7.3 Pointers as Arguments 199
7.4 Pointers as Return Values 201
7.5 Using Pointers for Array 201
7.6 Array Arguments 204
7.9 Pointers and Multidimensional Arrays 205
7.10 Pointers to Functions 207
Quiz 7 208
Answer 209
Chapter 8 Strings 210
8.1 String Constants and Variables 210
8.1.1 String Constants 210
8.1.2 String Variables 211
8.2 Reading and Writing Strings 212
8.2.1 Writing Strings 212
8.2.2 Reading Strings 213
8.3 Accessing the Characters in a String 214
8.4 Using the C String Library 215
8.4.1 strcpy and strncpy 215
8.4.2 strlen 216
8.4.3 strcat and strncat 216
8.4.4 strcmp 217
8.5 sprintf and sscanf 218
8.6 Array of Strings 219
8.7 Array of Pointers to Strings 220
Quiz 8. 221
Answer 222
Chapter 9 Structures, Unions, and Enumerations 223
9.1 Structure Variables 223
9.1.1 Structure Variables 223
9.1.2 Structures as Arguments and Return Values 228
9.1.3 Arrays of Structures 230
9.1.4 Pointers to structs 231
9.2 Unions 231
9.3 Enumerations 233
Quiz 9 234
Answer 236
Chapter 10 LinkedList 237
10.1 Introduction 237
10.3 creating a linked list 239
10.4 Insert a node 242
10.5 Search a node 245
10.6 delete a node 245
Chapter 11 Files 247
11.1 Streams 247
11.2 File Operations 248
11.2.1 Opening a file 249
11.2.2 Closing a file 251
11.2.3 remove and rename functions 251
11.2.4 Detecting End-of-File and Error Conditions 252
11.3 Input/Output operation on File 253
11.3.1 Character Input/Output Functions 253
11.3.2 Line Input/Output Functions 255
11.3.3 Formatted Input/Output Functions 257
11.3.4 Block Input/Output Functions 259
11.4 File Position 260
Quiz 11 261
Answer 11 261

相關詞條

熱門詞條

聯絡我們