1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

practical c programming 3rd ed 1997 7301

7 2 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Nội dung

This new edition of "Practical C Programming" teaches users not only the mechanics or programming, but also how to create programs that are easy to read, maintain, and debug It features more extensive examples and an introduction to graphical development environments Programs conform to ANSI C TEAM FLY PRESENTS Table of Contents Preface How This Book is Organized Chapter by Chapter Notes on the Third Edition Font Conventions Obtaining Source Code Comments and Questions Acknowledgments Acknowledgments to the Third Edition I Basics What Is C? How Programming Works Brief History of C How C Works How to Learn C Basics of Program Writing Programs from Conception to Execution Creating a Real Program Creating a Program Using a Command-Line Compiler Creating a Program Using an Integrated Development Environment Getting Help on UNIX Getting Help in an Integrated Development Environment IDE Cookbooks Programming Exercises Style Common Coding Practices Coding Religion Indentation and Code Format Clarity Simplicity Summary Basic Declarations and Expressions Elements of a Program Basic Program Structure Simple Expressions Variables and Storage TEAM FLY PRESENTS Variable Declarations Integers Assignment Statements printf Function Floating Point Floating Point Versus Integer Divide Characters Answers Programming Exercises Arrays, Qualifiers, and Reading Numbers Arrays Strings Reading Strings Multidimensional Arrays Reading Numbers Initializing Variables Types of Integers Types of Floats Constant Declarations Hexadecimal and Octal Constants Operators for Performing Shortcuts Side Effects ++x or x++ More Side-Effect Problems Answers Programming Exercises Decision and Control Statements if Statement else Statement How Not to Use strcmp Looping Statements while Statement break Statement continue Statement Assignment Anywhere Side Effect Answer Programming Exercises Programming Process Setting Up Specification TEAM FLY PRESENTS Code Design Prototype Makefile Testing Debugging Maintenance Revisions Electronic Archaeology Marking Up the Program Using the Debugger Text Editor as a Browser Add Comments Programming Exercises II Simple Programming More Control Statements for Statement switch Statement switch, break, and continue Answers Programming Exercises Variable Scope and Functions Scope and Class Functions Functions with No Parameters Structured Programming Recursion Answers Programming Exercises 10 C Preprocessor #define Statement Conditional Compilation include Files Parameterized Macros Advanced Features Summary Answers Programming Exercises 11 Bit Operations Bit Operators The and Operator (&) TEAM FLY PRESENTS Bitwise or (|) The Bitwise Exclusive or (^) The Ones Complement Operator (Not) (~) The Left- and Right-Shift Operators () Setting, Clearing, and Testing Bits Bitmapped Graphics Answers Programming Exercises 12 Advanced Types Structures Unions typedef enum Type Casting Bit Fields or Packed Structures Arrays of Structures Summary Programming Exercises 13 Simple Pointers Pointers as Function Arguments const Pointers Pointers and Arrays How Not to Use Pointers Using Pointers to Split a String Pointers and Structures Command-Line Arguments Programming Exercises Answers 14 File Input/Output Conversion Routines Binary and ASCII Files The End-of-Line Puzzle Binary I/O Buffering Problems Unbuffered I/O Designing File Formats Answers Programming Exercises 15 Debugging and Optimization Debugging Interactive Debuggers TEAM FLY PRESENTS A C keyword that indicates that the value of a variable or constant can be changed at any time This attribute is used for memory mapped I/O, shared memory applications, and other advanced programming while An iterative statement that repeats a statement as long as a given condition is true Windows Also knows as MS -Windows An operating system developed for personal computers by Microsoft Corporation Also a new operating system with a similar user interface and API such as Windows NT and Windows 95 X Window System A graphics and windowing system available from the X Consortium that is currently running on many computing systems Zero-based counting A system of counting by which the first object is given the count zero rather than one 502 TEAM FLY PRESENTS Colophon Our look is the result of reader comments, our own experimentation, and feedback from distribution channels Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects The animal featured on the cover of Practical C Programming is a Jersey cow The Jersey, one of the many breeds of modern cows, originated from a now extinct stock of wild cattle that inhabited western Asia, North Africa, and continental Europe Cows were first introduced into the western hemisphere by Christopher Columbus on his second voya ge in 1493 Jerseys, bred on the British isle of Jersey since 1789, were first introduced to America in the 1850s Smallest of the modern dairy cows, this fawn-colored beast typically weighs between 1000 and 1500 pounds As a milk producer, Jerseys are the least prolific of any American dairy cow However, their milk is creamier than that of any other breed Edie Freedman designed the cover of this book, using a 19th-century engraving from the Dover Pictorial Archive The cover layout was produced with Quark XPress 3.32 using the ITC Garamond font The inside layout was designed by Nancy Priest and implemented in FrameMaker 5.0 by Mike Sierra The text and heading fonts are ITC Garamond Light and Garamond Book The illustrations that appear in the book were created in Macromedia Freehand 5.0 by Chris Reilley and updated by Robert Romano This colophon was written by Michael Kalantarian 503 TEAM FLY PRESENTS ... Structured Programming Recursion Answers Programming Exercises 10 C Preprocessor #define Statement Conditional Compilation include Files Parameterized Macros Advanced Features Summary Answers Programming. .. dry subjects The animal featured on the cover of Practical C Programming is a Jersey cow The Jersey, one of the many breeds of modern cows, originated from a now extinct stock of wild cattle that... Setting, Clearing, and Testing Bits Bitmapped Graphics Answers Programming Exercises 12 Advanced Types Structures Unions typedef enum Type Casting Bit Fields or Packed Structures Arrays of Structures

Ngày đăng: 04/12/2022, 14:50

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w