HAPPY BOOKSGIVING
Use code BOOKSGIVING during checkout to save 40%-55% on books and eBooks. Shop now.
Register your product to gain access to bonus material or receive a coupon.
This eBook includes the following formats, accessible from your Account page after purchase:
EPUB The open industry format known for its reflowable content and usability on supported mobile devices.
PDF The popular standard, used most often with the free Acrobat® Reader® software.
This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.
The professional programmer’s Deitel® guide to procedural programming in C through 130 working code examples
Written for programmers with a background in high-level language programming, this book applies the Deitel signature live-code approach to teaching the C language and the C Standard Library. The book presents the concepts in the context of fully tested programs, complete with syntax shading, code highlighting, code walkthroughs and program outputs. The book features approximately 5,000 lines of proven C code and hundreds of savvy tips that will help you build robust applications.
Start with an introduction to C, then rapidly move on to more advanced topics, including building custom data structures, the Standard Library, select features of the new C11 standard such as multithreading to help you write high-performance applications for today’s multicore systems, and secure C programming sections that show you how to write software that is more robust and less vulnerable. You’ll enjoy the Deitels’ classic treatment of procedural programming. When you’re finished, you’ll have everything you need to start building industrial-strength C applications.
Practical, example-rich coverage of:
Visit www.deitel.com
Download the sample pages (includes Chapter 2 and Index)
Preface xv
Chapter 1: Introduction 1
1.1 Introduction 2
1.2 The C Programming Language 2
1.3 CStandard Library 4
1.4 C++ and Other C-Based Languages 4
1.5 Typical C Program Development Environment 5
1.6 Test-Driving a C Application in Windows, Linux and Mac OS X 8
1.7 Operating Systems 16
Chapter 2: Introduction to C Programming 19
2.1 Introduction 20
2.2 ASimple C Program: Printing a Line of Text 20
2.3 Another Simple C Program: Adding Two Integers 24
2.4 Arithmetic in C 27
2.5 Decision Making: Equality and Relational Operators 31
2.6 Secure C Programming 35
Chapter 3: Control Statements: Part I 37
3.1 Introduction 38
3.2 Control Structures 38
3.3 The if Selection Statement 40
3.4 The if…else Selection Statement 40
3.5 The while Repetition Statement 43
3.6 Class Average with Counter-Controlled Repetition 44
3.7 Class Average with Sentinel-Controlled Repetition 46
3.8 Nested Control Statements 49
3.9 Assignment Operators 51
3.10 Increment and Decrement Operators 52
3.11 Secure C Programming 55
Chapter 4: Control Statements: Part II 57
4.1 Introduction 58
4.2 Repetition Essentials 58
4.3 Counter-Controlled Repetition 59
4.4 for Repetition Statement 60
4.5 for Statement: Notes and Observations 63
4.6 Examples Using the for Statement 64
4.7 switch Multiple-Selection Statement 67
4.8 do…while Repetition Statement 73
4.9 break and continue Statements 75
4.10 Logical Operators 77
4.11 Confusing Equality (==) and Assignment (=) Operators 80
4.12 Secure C Programming 81
Chapter 5: Functions 83
5.1 Introduction 84
5.2 Program Modules in C 84
5.3 Math Library Functions 85
5.4 Functions 86
5.5 Function Definitions 87
5.6 Function Prototypes: A Deeper Look 91
5.7 Function Call Stack and Stack Frames 94
5.8 Headers 97
5.9 Passing Arguments By Value and By Reference 98
5.10 Random Number Generation 99
5.11 Example: A Game of Chance 104
5.12 Storage Classes 107
5.13 Scope Rules 109
5.14 Recursion 112
5.15 Example Using Recursion: Fibonacci Series 116
5.16 Recursion vs. Iteration 119
5.17 Secure C Programming 121
Chapter 6: Arrays 122