没有合适的资源?快使用搜索试试~ 我知道了~
首页Understanding and Using C Pointers 无水印pdf
资源详情
资源推荐
![](https://csdnimg.cn/release/download_crawler_static/9989268/bg4.jpg)
Understanding and Using C Pointers
by Richard Reese
Copyright © 2013 Richard Reese, Ph.D. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are
also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/
institutional sales department: 800-998-9938 or corporate@oreilly.com.
Editors: Simon St. Laurent and Nathan Jepson
Production Editor: Rachel Steely
Copyeditor: Andre Barnett
Proofreader: Rachel Leach
Indexer: Potomac Indexing, LLC, Angela Howard
Cover Designer: Karen Montgomery
Interior Designer: David Futato
Illustrator: Kara Ebrahim
May 2013: First Edition
Revision History for the First Edition:
2013-04-30: First release
See http://oreilly.com/catalog/errata.csp?isbn=9781449344184 for release details.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly
Media, Inc. Understanding and Using C Pointers, the image of a piping crow, and related trade dress are
trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trade‐
mark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and author assume no
responsibility for errors or omissions, or for damages resulting from the use of the information contained
herein.
ISBN: 978-1-449-34418-4
[LSI]
![](https://csdnimg.cn/release/download_crawler_static/9989268/bg5.jpg)
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
1. Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Pointers and Memory 2
Why You Should Become Proficient with Pointers 3
Declaring Pointers 5
How to Read a Declaration 7
Address of Operator 8
Displaying Pointer Values 9
Dereferencing a Pointer Using the Indirection Operator 11
Pointers to Functions 11
The Concept of Null 11
Pointer Size and Types 15
Memory Models 16
Predefined Pointer-Related Types 16
Pointer Operators 20
Pointer Arithmetic 20
Comparing Pointers 25
Common Uses of Pointers 25
Multiple Levels of Indirection 25
Constants and Pointers 27
Summary 32
2.
Dynamic Memory Management in C. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Dynamic Memory Allocation 34
Memory Leaks 37
Dynamic Memory Allocation Functions 39
Using the malloc Function 39
Using the calloc Function 43
iii
剩余225页未读,继续阅读
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![](https://csdnimg.cn/release/wenkucmsfe/public/img/green-success.6a4acb44.png)