Conquer C pointer

Source: Internet
Author: User

Conquer the C pointer

Basic Information
Author: (Sun) qianqiao and MI [Translator's introduction]
Translator: Wu Yu
Series name: Turing programming Series
Press: People's post and telecommunications Press
ISBN: 9787115301215
Mounting time:
Published on: February 1, February 2013
Start: 16
Page number: 1
Version: 1-1
Category: Computer> Software and programming> C/Turbo C> C


For more information, conquer the C pointer

Introduction
Computer books
Conquer the C pointer is called Japan's most nutritious C reference book. The author is a famous Japanese "drug-tongue programmer". His words are sharp and his views are clear, which often allows readers to quickly comprehend the essentials.
"Conquer the C Pointer" combines the author's years of programming experience and insights, starting from the concept of the C language pointer, the experiment explains the relationship between pointers and arrays, memory, and data structures step by step, Presents common usage of pointers, and reveals various usage techniques. In addition, we also teach us how to interpret the "tangle" declarative syntax of the C language in a unique way and how to bypass the trap of the C pointer.
The "conquer C Pointer" is suitable for intermediate C language learners and can be used as a reference for computer students to learn C language.

Directory
Conquer the C pointer
Chapter 1 objectives and structure of this book-Introduction 1
Objective 1 of the 0.1 book
0.2 target readers and content structure 3
Chapter 4 starting from basics-preparation and review 7
1.1 What is C language 7
1.1.1 analogy 7
1.1.2 c Development History 8
1.1.3 incomplete and inconsistent syntax 9
1.1.4 ansi c 10
1.1.5 c-k & R 11
1.1.6 C concept 12
1.1.7 C subject 14
1.1.8 C is a language that can only use a scalar.
1.2 about pointer 16
1.2.1 What is the pointer of the evil name refer? 16
1.2.2 first intimate contact with pointers 17
1.2.3 subtle relationship between pointer and address 23
1.2.4 pointer operation 26
1.2.5 what is a null pointer 27
. 1.2.6 practice -- Swap function 31
1.3 about array 34
1.3.1 use array 34
1.3.2 subtle relationship between arrays and pointers 37
1.3.3 The subscript operator [] is irrelevant to the array 39
1.3.4 why is there a strange pointer operation 42
1.3.5 do not abuse pointer operations 43
1.3.6 try to pass the array as a function parameter 45
1.3.7 Method for declaring function parameters 48
Chapter 4 experiment: How c uses the memory 51
2.1 virtual address 51
2.2 C memory usage 56
2.2.1 C variable types 56
2.2.2 output address 58
2.3 functions and string constants 61
2.3.1 read-only memory area 61
2.3.2 pointer to function 62
2.4 static variable 64
2.4.1 what is static variable 64
2.4.2 separate compilation and connection 64
2.5 automatic variables (stacks) 66
2.5.1 "reuse" 66 in the memory area
2.5.2 what happened to function call 66
2.5.3 variable length parameter 73
2.5.4 recursive call 80
2.6 Use malloc () for dynamic memory allocation (HEAP) 84
2.6.1 basics of malloc () 84
2.6.2 is malloc () a "system call"? 88
2.6.3 what happened in malloc () 89
2.6.4 what will happen to the corresponding memory area after free ()? 91
2.6.5 fragmentation 93
2.6.6 dynamic memory allocation functions other than malloc () 94
2.7 memory layout alignment 98
2.8 byte sorting 101
2.9 standards and implementation of development languages-sorry, the previous content is just a flicker of 102
Chapter 4 uncover C's syntax-what is it about? 3rd
3.1 interpretation of C's statement 105
3.1.1 read in English 105
3.1.2 interpretation of C statement 106
3.1.3 type 109
3.2 c Data-type model 111
3.2.1 basic and derived types 111
3.2.2 pointer type derivation 112
3.2.3 array type derivation 113
3.2.4 what is the pointer to the array 114
3.2.5 no multi-dimensional array exists in C! 116
3.2.6 function type derivation 117
3.2.7 size of computing type 119
3.2.8 basic type 121
3.2.9 struct and shared body 122
3.2.10 incomplete type 123
3.3 expression 125
3.3.1 expression and Data Type 125
3.3.2 what is the "Left value"-two faces of the variable 129
3.3.3 interpret the array as a pointer 130
3.3.4 array and pointer-related operators 132
3.3.5 multi-dimensional array 133
3.4 interpretation of C's statement (continued) 137
3.4.1 const modifier 137
3.4.2 how to use const? To what extent? 139
3.4.3 Type Def 141
3.5 others 143
3.5.1 declaration of function parameters 143
3.5.2 null subscripts operator [] 146
3.5.3 The String constant 148
3.5.4 confusion caused by pointers to functions 151
3.5.5 forced type conversion 152
3.5.6 exercise-challenge those complex statements 153
3.6 remember: arrays and pointers are different things 157
3.6.1 why is chaos 157
158 in expression 3.6.2
3.6.3 statement 160
Chapter 2 common methods of arrays and pointers 4th
4.1 basic usage 161
4.1.1 return value 161 in a way other than the function return value
4.1.2 pass the array as a function parameter 162
4.1.3 variable-length array 163
4.2 combined use 166
4.2.1 variable-length array 166
4.2.2 Variable Length array 172
4.2.3 argument 174
4.2.4 return pointer 177 through Parameters
4.2.5 passing a multi-dimensional array as a function parameter 181
4.2.6 Variable Length array 182
4.2.7 consider using the struct 183 before it becomes "variable ".
4.3 skills against standards 187
4.3.1 Variable Length struct 187
4.3.2 array 189 starting from 1
Chapter 4 Data Structure -- how to use real pointers 5th
5.1 Case study 1: Calculate the occurrence frequency of words by 193
5.1.1 case requirements 193
5.1.2 design 195
5.1.3 version 200
5.1.4 Linked List version 203
5.1.5 append SEARCH function 211
5.1.6 other data structures 214
5.2 Case study 2: Data Structure of the drawing tool 218
5.2.1 requirement of case 218
5.2.2 implement data models for various graphics 219
5.2.3 shape 221
5.2.4 discussion -- is there any other method? 223
5.2.5 Image Combination 228
5.2.6 inheritance and polymorphism 233
5.2.7 fear of pointer 236
5.2.8 what is the pointer? 237
Chapter 2 miscellaneous-saving part 6th
6.1 trap 239
6.1.1 about strncpy () 239
6.1.2 If the float type parameter 240 is used in early C
6.1.3 printf () and scanf () 242
6.1.4 lighting and shadows declared by the prototype 243
6.2 common syntax 245
6.2.1 struct declaration 245
6.2.2 self-referenced struct 246
6.2.3 mutual reference of struct 247
6.2.4 nested struct 248
6.2.5 shared body 249
6.2.6 array initialization 250
6.2.7 initialize the char array 250
6.2.8 initialization of the array pointing to the char pointer 251
6.2.9 struct initialization 252
6.2.10 initialization of the shared body 252
6.2.11 declaration of global variables 253

Source of this book: China Interactive publishing network

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.