tailieunhanh - Absolute C++ 2th
Offers complete coverage of the C++ programming language. This title offers provides all the tools necessary for experienced and novice programmers to master C++, including: thorough coverage of the Standard Template Library; complete and fully executable code throughout; sections highlighting programming tips and common pitfalls; and a logical order of coverage of C++ topics in order for readers to better understand the language. This book is appropriate for anyone interested in learning how to programming using the C++ programming language | C Basics INTRODUCTION TO C 2 Origins of the C Language 2 C and Object-Oriented Programming 3 The Character of C 3 C Terminology 4 A Sample C Program 4 VARIABLES EXPRESSIONS AND ASSIGNMENT STATEMENTS 6 Identifiers 6 Variables 8 Assignment Statements 10 Pitfall Uninitialized Variables 12 Tip Use Meaningful Names 13 More Assignment Statements 13 Assignment Compatibility 14 Literals 15 Escape Sequences 17 Naming Constants 17 Arithmetic Operators and Expressions 19 Integer and Floating-Point Division 21 Pitfall Division with Whole Numbers 22 Type Casting 23 Increment and Decrement Operators 25 Pitfall Order of Evaluation 27 CONSOLE INPUT OUTPUT 28 Output Using cout 28 New Lines in Output 29 Tip End Each Program with n or endl 30 Formatting for Numbers with a Decimal Point 30 Output with cerr 32 Input Using cin 32 Tip Line Breaks in I O 34 PROGRAM STYLE 35 Comments 35 LIBRARIES AND NAMESPACES 36 Libraries and include Directives 36 Namespaces 37 Pitfall Problems with Library Names 38 CHAPTER SUMMARY 38 ANSWERS TO SELF-TEST EXERCISES 39 PROGRAMMING PROJECTS 41 C Basics The Analytical Engine has no pretensions whateverto originate anything. It can do whatever we know how to order it to perform. It can follow analysis but it has no power of anticipating any analytical relations or truths. Its province is to assist us in making available what we are already acquainted with. Ada Augusta Countess of Lovelace Introduction This chapter introduces the C language and gives enough detail to allow you to handle simple programs involving expression assignments and console input output I O . The details of assignment and expressions are similar to those of most other high-level languages. Every language has its own console I O syntax so if you are not familiar with C that may look new and different to you. Introduction to C Language is the only instrument of science. Samuel Johnson This section gives an overview of the C programming language. origins of the C .
đang nạp các trang xem trước