Example: bankruptcy

C Primer Plus, Fifth Edition - University of Cincinnati

C Primer Plus, Fifth Edition By Stephen Prata Publisher : Sams Pub Date : November 23, 2004 ISBN : 0-672-32696-5 Pages :792 A lean revision of a computer industry classic that has sold over 500,000 copies in previous Edition contains over 20 new programming exercises and newly improved and C++ account for 30% of developers, about three million, and is a $22 million book market per the third Edition by integrating new ANSI/ISO standard, that teaches the fundamentals of programming. PREFACE C was a relatively little-known language when the first Edition of C Primer Plus was written in 1984.

C was a relatively little-known language when the first edition of C Primer Plus was written in 1984. Since then, the language has boomed, and many people have learned C with the help of this book. In fact, over 500,000 people have purchased C …

Tags:

  Primer

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of C Primer Plus, Fifth Edition - University of Cincinnati

1 C Primer Plus, Fifth Edition By Stephen Prata Publisher : Sams Pub Date : November 23, 2004 ISBN : 0-672-32696-5 Pages :792 A lean revision of a computer industry classic that has sold over 500,000 copies in previous Edition contains over 20 new programming exercises and newly improved and C++ account for 30% of developers, about three million, and is a $22 million book market per the third Edition by integrating new ANSI/ISO standard, that teaches the fundamentals of programming. PREFACE C was a relatively little-known language when the first Edition of C Primer Plus was written in 1984.

2 Since then, the language has boomed, and many people have learned C with the help of this book. In fact, over 500,000 people have purchased C Primer Plus throughout its various editions. As the language has grown from the early informal K&R standard through the 1990 ISO/ANSI standard to the 1999 ISO/ANSI standard, so has this book matured through this, the Fifth Edition . As with all the editions, my aim has been to create an introduction to C that is instructive, clear, and helpful. Approach and Goals My goal is for this book to serve as a friendly, easy-to-use, self-study guide.

3 To accomplish that objective, C Primer Plus employs the following strategies: Programming concepts are explained, along with details of the C language; the book does not assume that you are a professional programmer. Many short, easily typed examples illustrate just one or two concepts at a time, because learning by doing is one of the most effective ways to master new information. Figures and illustrations clarify concepts that are difficult to grasp in words alone. Highlight boxes summarize the main features of C for easy reference and review. Review questions and programming exercises at the end of each chapter allow you to test and improve your understanding of C.

4 To gain the greatest benefit, you should take as active a role as possible in studying the topics in this book. Don't just read the examples, enter them into your system, and try them. C is a very portable language, but you may find differences between how a program works on your system and how it works on ours. Experiment change part of a program to see what the effect is. Modify a program to do something slightly different. Ignore the occasional warnings and see what happens when you do the wrong thing. Try the questions and exercises. The more you do yourself, the more you will learn and remember.

5 I hope that you'll find this newest Edition an enjoyable and effective introduction to the C language. ABOUT THE AUTHOR Stephen Prata teaches astronomy, physics, and programming at the College of Marin in Kentfield, California. He received his from the California Institute of Technology and his from the University of California, Berkeley. His association with computers began with the computer modeling of star clusters. Stephen has authored or coauthored over a dozen books, including C++ Primer Plus and Unix Primer Plus.

6 ACKNOWLEDGMENTS I wish to thank Loretta Yates of Sams Publishing for getting this project underway and Songlin Qiu of Sams Publishing for seeing it through. Also, thank you Ron Liechty of Metrowerks and Greg Comeau of Comeau Computing for your help with new C99 features and your noteworthy commitment to customer service. Table of content Chapter 1. Getting 1 Whence C? .. 1 Why C? .. 1 Whither C? .. 3 What Computers Do .. 4 High-level Computer Languages and Compilers .. 5 Using C: Seven Steps .. 6 Programming Mechanics .. 9 Language Standards .. 15 How This Book Is Organized.

7 16 Conventions Used in This Book .. 16 Summary .. 18 Review Questions .. 18 Programming 19 Chapter 2. Introducing C .. 19 A Simple Example of C .. 19 The Example Explained .. 20 The Structure of a Simple Program .. 30 Tips on Making Your Programs Readable .. 31 Taking Another Step in Using C .. 32 While You're at It Multiple Functions .. 33 Introducing Debugging .. 35 Keywords and Reserved Identifiers .. 38 Key 38 Summary .. 39 Review Questions .. 39 Programming Exercises .. 40 Chapter 3. Data and C .. 41 A Sample Program .. 42 Data Variables and Constants .. 44 Data: Data-Type Keywords.

8 44 Basic C Data Types .. 47 Using Data Types .. 70 Arguments and Pitfalls .. 70 One More Example: Escape Sequences .. 72 Key 74 Summary .. 74 Review Questions .. 75 Programming Exercises .. 77 Chapter 4. Character Strings and Formatted Input/Output .. 77 Introductory Program .. 78 Character Strings: An 79 Constants and the C Preprocessor .. 83 Exploring and Exploiting printf() and scanf() .. 88 Key 108 Summary .. 109 Review Questions .. 110 Programming Exercises .. 112 Chapter 5. Operators, Expressions, and Statements .. 113 Introducing Loops .. 113 Fundamental Operators.

9 115 Some Additional Operators .. 124 Expressions and 132 Type Conversions .. 138 Function with Arguments .. 141 A Sample Program .. 142 Key 144 Summary .. 144 Review Questions .. 145 Programming Exercises .. 147 Chapter 6. C Control Statements: 149 Revisiting the while Loop .. 150 The while Statement .. 152 Which Is Bigger: Using Relational Operators and Expressions .. 156 Indefinite Loops and Counting Loops .. 164 The for Loop .. 165 More Assignment Operators: +=, -=, *=, /=, %= .. 171 The Comma Operator .. 171 An Exit-Condition Loop: do 176 Which Loop? .. 179 Nested Loops.

10 180 Introducing Arrays .. 181 A Loop Example Using a Function Return Value .. 184 Key 188 Summary .. 188 Review Questions .. 189 Programming Exercises .. 193 Chapter 7. C Control Statements: Branching and Jumps .. 195 The if 196 Adding else to the if Statement .. 197 Let's Get Logical .. 211 A Word-Count Program .. 216 The Conditional Operator: ?:.. 219 Loop Aids: continue and break .. 221 Multiple Choice: switch and break .. 225 The goto Statement .. 232 Key 235 Summary .. 236 Review Questions .. 236 Programming Exercises .. 239 Chapter 8. Character Input/Output and Input Validation.


Related search queries