1 Introduction to Programming and C 1.1 Introdution 1.2 Introdution to programming languages 1.3 Introduction to C 1.4 Writing the first C program 1.5 Compiling and running C programs 1.6 Running C programs online 1.7 Running C programs in Microsoft Visual C++ 1.8 Running C programs in Code::Blocks IDE 1.9 Writing the first C++ program in CodeBlocks IDE 1.10 Review questions 2 C Programming Basis 2.1 Introduction 2.2 Variables and identifiers 2.3 Keywords 2.4 Data types 2.5 Formatted input and output 2.6 Literals and constants 2.7 Type casting 2.8 Review questions 3 Operators and Expressions 3.1 Introduction 3.2 Relational and equality operators 3.3 Arithmetic operators 3.4 Bitwise operators 3.5 Assignment operators 3.6 Increment and decrement operators 3.7 Logical operators 3.8 Conditional operator 3.9 Special operators 3.10 Operator precedence and associativity 3.11 Review questions 4 Branching and Looping 4.1 Introduction 4.2 The if statement 4.3 The if-else statement 4.4 The if-else-if statement 4.5 Nested if-else statement 4.6 The switch statement 4.7 The ternary operator 4.8 The gore and labels 4.9 The while loop 4.10 The do-while loop 4.11 The for loop 4.12 Nesting of loops 4.13 The break statement 4.14 The continue statement 4.15 Review questions 5 Arrays 5.1 Introduction 5.2 One-dimensional arrays 5.3 Multi-dimensional arrays 5.4 Searching methods 5.5 Linear search 5.6 Binary search 5.7 Sorting methods 5.8 Insertion sort 5.9 Selection sort 5.10 Bubble sort 5.11 Applications of two-dimensional arrays 5.12 Review questions 6 Strings and Pointers 6.1 Introduction 6.2 String library functions 6.3 Array of strings 6.4 Sorting characters and strings 6.5 Introduction to pointers 6.6 Pointer to pointer 6.7 Pointers and arrays 6.8 Array of pointers 6.9 Review questions 7 Functions 7.1 Introduction 7.2 Defining a function 7.3 Arguments and parameters 7.4 Scope of function variables 7.5 Static variables 7.6 Functions and pointers 7.7 Recursive functions 7.8 Built-in functions 7.9 Review questions 8 Structures and Unions 8.1 Introduction 8.2 Defining structures 8.3 Initializing structures 8.4 Accessing structure members 8.5 Using typedef keyword 8.6 Nested structures 8.7 Structures containing arrays 8.8 Arrays of structures 8.9 Structures and pointers 8.10 Structures and linked list 8.11 Structures and functions 8.12 Unions 8.13 Review questions 9 File Handling 9.1 Introduction 9.2 File operations 9.3 Data files using structures 9.4 Deleting a file 9.5 Copying and merging files 9.6 Review questions Appendix A List of header files and standard library functions Appendix B Sample programming exercises Appendix C Model question paper and answers Appendix D Decimal-binary-octal-hex-ASCII conversion chart Appendix E Bibliography Appendix F English-Chinese Vocabulary List About the authors