C language pointer guide-postscript

Source: Internet
Author: User

Please repost the source from a friend

Postscript

Since the idea of writing this series of articles was born, it has lasted nearly half a year since the true completion of the articles. In the past six months, I have changed from my sophomore year to my senior year, I have gone through various tests and just completed my application. During this period, I learned a lot. This knowledge is more or less explicit and implicitly helpful to my understanding of C language and pointers. In addition, I found that writing something can mention my own level. In the process of writing "pointer Guide", I feel that my understanding of this knowledge is also deepening.

After the article was written, When I reviewed the content, I found that pointer, as a mechanism of C language, is almost the central nervous system of C, because the pointer variable stores the address, in this case, the pointer is almost able to establish a relationship with any mechanism in C, therefore, if you want to learn pointers well, you must have a clear understanding of the features of other languages so that they can be integrated. Of course, this is just my personal understanding. I hope to communicate with you.

In addition, I found that the C language knowledge in C ++ is almost fully applicable (only slightly different), so if you want to build something on C ++, I think it will be very helpful for you to understand the C ++ part clearly, in this way, you have time and energy to focus on upper-layer applications or ideas related to object-oriented, generic programming, and design patterns, instead of worrying about the basic knowledge that should have been understood. Also, do not think that the pointer application will be missing in C ++. In C ++ object-oriented programming, you can hardly escape the pointer's "Claw ", even if you have suggestions from the C ++ masters that the standard library should be widely used to avoid using pointers, it is really hard to do that. Learning a good pointer will also help you understand the concept of the iterator.

Finally, I am afraid to recommend you some classic books on C language for beginners. You should always read these classic books, and each time you open the book, you will have a new understanding. Also, please note that technical books must read classic books. Otherwise, you will waste a lot of time and may be taken astray. I only recommend five books and describe them in a short language. The order of introduction and the reading sequence you want to arrange should not be too different:

1.《CProgramming Language (The C Programming Language)

Author:Brian
W. kernighan & Dennis M. Ritchie

This book is written by Brian W, a C language designer. kernighan and Dennis M. ritchie is an authoritative book that describes the Standard C language and its programming methods. It comprehensively and systematically describes the features of the C language and the basic programming methods. The authority of this book is beyond doubt. many books on the market will refer to this "Bible" when writing. In other words, without this book, we will not see any C language tutorials. Read this book with patience. Read it several more times to understand the idea of C program design. Exercise questions in the book are the best way to master the features of a new language. They must be taken seriously and the answers to related exercises can be easily found on the market.

2.《CTraps and DefectsC traps and pitfalls)

Author:Andrew
Koenig

This book does not teach you how to use C language programming, nor is it an encyclopedia of C language for your reference. It tells you how to help you bypass the "traps" and obstacles in the C language programming process. The knowledge revealed in this book can at least help you reduce 90% of bugs in C code and Elementary C ++ code. There are also exercises corresponding to the content of each chapter in the book. Taking each question seriously and carefully studying the answer will make it easier for you to bypass the "trap ".

3.《CExpert programming (Expert C Programming)

Author:Peter
Van der Linden

This is a must-read book to become a C expert. The author uses humorous and easy narration to show you the underlying mechanisms and advanced usage skills of some C language features, and explains the reasons for the formation of some features, let you know and know why. The book introduces some problems that are prone to errors in use. In the last chapter, the author elaborates on the basic features of C ++ in a concise and incisive manner. In addition, the book also sets up the "little inspiration" column, which appears in the practical work experience and guidelines for your application in programming. In the appendix, there is a confidential introduction to the programmer's interview. This interview question is still favored by major companies and will be of great help for your language learning and job search. The reading of "C expert programming" is more difficult than "C traps and defects". Do not read the simple story and lose the main content, read it several times and think deeply before you can understand its mysteries.

4.《CAnd pointer (Pointers on C)

Author:Kenth
A. reek

The name of this book reflects my idea. Unlike many books on the market that only use one chapter to talk about pointers, the author uses pointers as the clues of this book and runs through the explanations of other C language features, this article describes how to effectively use pointers in different context environments, and how to explain them in depth. After reading the first three books and reviewing what you have learned through this book, you may also see the knowledge and skills you have never seen before. This is the charm of "C and pointer, in addition, the book also describes issues such as programming efficiency and program maintainability.

5.《CLanguage Reference Manual (C: A Reference Manual)

Author:Samuel
P. Harbison & guy l. Steele

This book is an authoritative reference manual for C language. The book consists of two parts: the first part discusses all the features of C language, and the second part discusses the standard library of C language, the functions are described in detail. This book provides many examples and explanations when discussing the details of C language and standard library, so that readers can understand related concepts. The chapters in the first part also provide exercises and answers to the main exercises, which can help readers better understand the basic functions and features of the C language. I think this book's description of C language is clearer and more detailed than any other book. What's more important is that the author's language is very concise and has no redundancy. To be proficient in the C language, this book must be read. If you are studying C or a C language developer, you should put this book in your case. Even if you are a C ++ programmer, I suggest you buy one, if you have a good understanding of C skills, it will help you become a good C ++ programmer.

I would like to give you a suggestion: book selection tends to be a newer version, because the new version usually contains all the previous knowledge points and covers the latest technical features, we may not use all these new technologies, but when we really need to use and query information, you may save a lot of time by choosing the right version.

The book has been introduced, but everyone should never fall into the abyss of dead-Book Studies. To learn program design well, you must combine theory with practice, do more work, and work diligently to make a good result. Here, I hope that all the friends who are studying program design will be able to achieve the satisfaction of yourself, those who are interested in you, and those who are interested in you.

 

Preface

1. What is a pointer?

2. pointer definition and Operation

3. pointer and array "Love and hate"

4. distinguish between function pointers and pointer Functions

5. pointer and Structure

6. "trap" when using pointers"

Related Article

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.