C Programming
Home > Computing and Information Technology > Computer programming / software engineering > Programming and scripting languages: general > C Programming: A Modern Approach
C Programming: A Modern Approach

C Programming: A Modern Approach

|
     0     
5
4
3
2
1




Available


About the Book

Professor King's spiral approach made it accessible to a broad range of readers, from beginners to more advanced students. With adoptions at over 225 colleges, the first edition was one of the leading C textbooks of the last ten years. The second edition maintains all the book's popular features and brings it up to date with coverage of the C99 standard. The new edition also adds a significant number of exercises and longer programming projects, and includes extensive revisions and updates.

Table of Contents:
1. Introducing C 1.1 History of C Origins Standardization C++ 1.2 Strengths and Weaknesses of C Strengths Weaknesses Effective Use of C 2. C Fundamentals 2.1 Writing a Simple Program PROGRAM: Printing a Pun Compiling and Linking 2.2 The General Form of a Simple Program Directives Functions Statements Printing Strings 2.3 Comments 2.4 Variables and Assignment Types Declarations Assignment Printing the Value of a Variable PROGRAM: Computing the Dimensional Weight of a Box Initialization Printing Expressions 2.5 Reading Input PROGRAM: Computing the Dimensional Weight of a Box (Revisited) 2.6 Defining Constants PROGRAM: Converting from Fahrenheit to Celsius 2.7 Identifiers Keywords 2.8 Layout of a C Program 3. Formatted Input/Output 3.1 The printf Function Conversion Specifications PROGRAM: Using printf to Format Numbers Escape Sequences 3.2 The scanf Function How scanf Works Ordinary Characters in Format Strings Confusing printf with scanf PROGRAM: Computing the Value of Stock Holdings 4. Expressions 4.1 Arithmetic Operators Operator Precedence and Associativity PROGRAM: Computing a UPC Check Digit 4.2 Assignment Operators Simple Assignment Lvalues Compound Assignment 4.3 Increment and Decrement Operators 4.4 Expression Evaluation Order of Subexpression Evaluation 4.5 Expression Statements 5 Selection Statements 5.1 Logical Expressions Relational Operators Equality Operators Logical Operators 5.2 The if Statement Compound Statements The else Clause Cascaded if Statements PROGRAM: Calculating a Broker\'s Commission The \'Dangling else\' Problem Conditional Expressions Boolean Values 5.3 The switch Statement The Role of the break Statement PROGRAM: Printing a Date in Legal Form 6. Loops 6.1 The while Statement Infinite Loops PROGRAM: Printing a Table of Squares PROGRAM: Summing a Series of Numbers 6.2 The do Statement PROGRAM: Calculating the Number of Digits in an Integer 6.3 The for Statement for Statement Idioms Omitting Expressions in a for Statement The Comma Operator PROGRAM: Printing a Table of Squares (Revisited) 6.4 Exiting from a Loop The break Statement The continue Statement The goto Statement PROGRAM: Balancing a Checkbook 6.5 The Null Statement 7. Basic Types 7.1 Integer Types Integer Constants Reading and Writing Integers PROGRAM: Summing a Series of Numbers (Revisited) 7.2 Floating Types Floating Constants Reading and Writing Floating-Point Numbers 7.3 Character Types Escape Sequences Character-Handling Functions Reading and Writing Characters PROGRAM: Determining the Length of a Message 7.4 The sizeof Operator 7.5 Type Conversion The Usual Arithmetic Conversions Conversion During Assignment Casting 7.6 Type Definitions 8. Arrays 8.1 One-Dimensional Arrays Array Subscripting PROGRAM: Reversing a Series of Numbers Array Initialization PROGRAM: Checking a Number for Repeated Digits Using the sizeof Operator with Arrays PROGRAM: Computing Interest 8.2 Multidimensional Arrays Initializing a Multidimensional Array Constant Arrays PROGRAM: Dealing a Hand of Cards 9. Functions 9.1 Defining and Calling Functions PROGRAM: Computing Averages PROGRAM: Printing a Countdown PROGRAM: Printing a Pun (Revisited) Function Definitions Function Calls PROGRAM: Testing Whether a Number Is Prime 9.2 Function Declarations 9.3 Arguments Argument Conversions Array Arguments 9.4 The return Statement The exit Function 9.6 Recursive Functions The Quicksort Algorithm PROGRAM: Quicksort 10. Program Organization 10.1 Local Variables Parameters 10.2 External Variables Example: Using External Variables to Implement a Stack Pros and Cons of External Variables PROGRAM: Guessing a Number 10.3 Blocks 10.4 Scope 10.5 Organizing a C Program PROGRAM: Classifying a Poker Hand 11. Pointers 11.1 Pointer Variables Declaring Pointer Variables 11.2 The Address and Indirection Operators The Address Operator The Indirection Operator 11.3 Pointer Assignment 11.4 Pointers as Arguments PROGRAM: Finding the Largest and Smallest Elements in an Array Using const to Protect Arguments 11.5 Pointers as Return Values 12. Pointers and Arrays 12.1 Pointer Arithmetic Adding an Integer to a Pointer Subtracting an Integer from a Pointer Subtracting Pointers Comparing Pointers 12.2 Using Pointers for Array Processing Combining the * and ++ Operators 12.3 Using an Array Name as a Pointer PROGRAM: Reversing a Series of Numbers (Revisited) Array Arguments (Revisited) Using a Pointer as an Array Name 12.4 Pointers and Multidimensional Arrays Processing the Elements of a Multidimensional Array Processing the Rows of a Multidimensional Array Using the Name of a Multidimensional Array as a Pointer 13. Strings 13.1 String Literals Escape Sequences in String Literals Continuing a String Literal How String Literals Are Stored Operations on String Literals String Literals versus Character Constants 13.2 String Variables Initializing a String Variable Character Arrays versus Character Pointers 13.3 Reading and Writing Strings Writing Strings Using printf and puts Reading Strings Using scanf and gets Reading Strings Character by Character 13.4 Accessing the Characters in a String 13.5 Using the C String Library The strcpy (String Copy) Function The strcat (String Concatenate) Function The strcmp (String Compare) Function The strlen (String Length) Function PROGRAM: Printing a One-Month Reminder List 13.6 String Idioms Searching for the End of a String Copying a String 13.7 Arrays of Strings Command-Line Arguments PROGRAM: Checking Planet Names 14. The Preprocessor 14.1 How the Preprocessor Works 14.2 Preprocessor Directives 14.3 Macro Definition Simple Macros Parameterized Macros The # Operator The ## Operator General Properties of Macros Parentheses in Macro Definitions Creating Longer Macros Predefined Macros 14.4 Conditional Compilation The #if and #endif Directives The defined Operator The #ifdef and #ifndef Directives The #elif and #else Directives Uses of Conditional Compilation 14.5 Miscellaneous Directives The #error Directive The #line Directive The #pragma Directive 15. Writing Large Programs 15.1 Source Files 15.2 Header Files The #include Directive Sharing Macro Definitions and Type Definitions Sharing Function Prototypes Sharing Variable Declarations Nested Includes Protecting Header Files #error Directives in Header Files 15.3 Dividing a Program into Files PROGRAM: Text Formatting 15.4 Building a Multiple-File Program Makefiles Errors During Linking Rebuilding a Program Defining Macros Outside a Program 16. Structures, Unions, and Enumerations 16.1 Structure Variables Declaring Structure Variables Initializing Structure Variables Operations on Structures 16.2 Structure Types Declaring a Structure Tag Defining a Structure Type Structures as Arguments and Return Values 16.3 Nested Arrays and Structures Nested Structures Arrays of Structures Initializing an Array of Structures PROGRAM: Maintaining a Parts Database 16.4 Unions Using Unions to Save Space Using Unions to Build Mixed Data Structures Adding a "Tag Field" to a Union 16.5 Enumerations Enumeration Tags and Types Enumerations as Integers Using Enumerations to Declare "Tag Fields" 17. Advanced Uses of Pointers 17.1 Dynamic Storage Allocation Memory Allocation Functions Null Pointers 17.2 Dynamically Allocated Strings Using malloc to Allocate Memory for a String Using Dynamic Storage Allocation in String Functions Arrays of Dynamically Allocated Strings PROGRAM: Printing a One-Month Reminder List (Revisited) 17.3 Dynamically Allocated Arrays Using malloc to Allocate Storage for an Array The calloc Function The realloc Function 17.4 Deallocating Storage The free Function The "Dangling Pointer" Problem 17.5 Linked Lists Declaring a Node Type Creating Nodes The -> Operator Inserting a Node at the Beginning of a Linked List Searching a Linked List Deleting a Node from a Linked List Ordered Lists PROGRAM: Maintaining a Parts Database (Revisited) 17.6 Pointers to Pointers 17.7 Pointers to Functions Function Pointers as Arguments The qsort Function PROGRAM: Tabulating the Trigonometric Functions 8. Declarations 18.1 Declaration Syntax 18.2 Storage Classes Properties of Variables The auto Storage Class The extern Storage Class The register Storage Class Summary 18.3 Type Qualifiers 18.4 Declarators Deciphering Complex Declarations Using Type Definitions to Simplify Declarations 18.5 Initializers Uninitialized Variables 19. Program Design 19.1 Modules Cohesion and Coupling Types of Modules 19.2 Information Hiding A Stack Module 19.3 Abstract Data Types Encapsulation 19.4 C++ Differences between C and C++ Classes Class Definitions Member Functions Constructors Constructors and Dynamic Storage Allocation Destructors Overloading Object-Oriented Programming Derivation Virtual Functions Templates Exception Handling 20. Low-Level Programming 20.1 Bitwise Operators Bitwise Shift Operators Bitwise Complement, And, Exclusive Or, and Inclusive Or Using the Bitwise Operators to Access Bits Using the Bitwise Operators to Access Bit-Fields PROGRAM: XOR Encryption 20.2 Bit-Fields in Structures How Bit-Fields Are Stored 20.3 Other Low-Level Techniques Defining Machine-Dependent Types Using Unions to Provide Multiple Views of Data Using Pointers as Addresses PROGRAM: Toggling the Num Lock Key The volatile Type Qualifier 21. The Standard Library 21.1 Using the Library Restrictions on Names Used in the Library Functions Hidden by Macros 21.2 Library Overview 21.3 The Header: Common Definitions 22. Input/Output 22.1 Streams File Pointers Standard Streams and Redirection Text Files versus Binary Files 22.2 File Operations Opening a File Modes Closing a File Attaching a File to a Stream btaining File Names from the Command Line PROGRAM: Checking Whether a File Can Be Opened Temporary Files File Buffering Miscellaneous File Operations 22.3 Formatted I/O The ...printf Functions ...printf Conversion Specifications Examples of ...printf Conversion Specifications The ...scanf Functions ...scanf Format Strings ...scanf Conversion Specifications scanf Examples Detecting End-of-File and Error Conditions 22.4 Character I/O Output Functions Input Functions PROGRAM: Copying a File 22.5 Line I/O Output Functions Input Functions 22.6 Block I/O 22.7 File Positioning PROGRAM: Modifying a File of Part Records 22.8 String I/O 23. Library Support for Numbers and Character Data 23.1 The Header: Characteristics of Floating Types 23.2 The Header: Sizes of Integral Types 23.3 The Header: Mathematics Errors Trigonometric Functions Hyperbolic Functions Exponential and Logarithmic Functions Power Functions Nearest Integer, Absolute Value, and Remainder Functions 23.4 The Header: Character Handling Character-Testing Functions PROGRAM: Testing the Character-Testing Functions Character Case-Mapping Functions PROGRAM: Testing the Case-Mapping Functions 23.5 The Header: String Handling Copying Functions Concatenation Functions Comparison Functions Search Functions Miscellaneous Functions 24. Error Handling 24.1 The Header: Diagnostics 24.2 The Header: Errors The perror and strerror Functions 24.3 The Header: Signal Handling Signal Macros The signal Function Predefined Signal Handlers The raise Function PROGRAM: Testing Signals 24.4 The Header: Nonlocal Jumps PROGRAM: Testing setjmp/longjmp 25. International Features 25.1 The Header: Localization Categories The setlocale Function The localeconv Function 25.2 Multibyte Characters and Wide Characters Multibyte Characters Wide Characters Multibyte Character Functions Multibyte String Functions 25.3 Trigraph Sequences 26 Miscellaneous Library Functions 26.1 The Header: Variable Arguments Calling a Function with a Variable Argument List The ...vprintf Functions 26.2 The Header: General Utilities String Conversion Functions PROGRAM: Testing the String Conversion Functions Pseudo-Random Sequence Generation Functions PROGRAM: Testing the Pseudo-Random Sequence Generation Functions Communication with the Environment Searching and Sorting Utilities PROGRAM: Determining Air Mileage Integer Arithmetic Functions 26.3 The Header: Date and Time Time Manipulation Functions Time Conversion Functions PROGRAM: Displaying the Date and Time


Best Sellers


Product Details
  • ISBN-13: 9780393979503
  • Publisher: WW Norton & Co
  • Publisher Imprint: WW Norton & Co
  • Edition: Revised edition
  • Language: English
  • Returnable: Y
  • Returnable: Y
  • Sub Title: A Modern Approach
  • Width: 191 mm
  • ISBN-10: 0393979504
  • Publisher Date: 16 May 2008
  • Binding: Paperback
  • Height: 234 mm
  • No of Pages: 864
  • Returnable: Y
  • Spine Width: 28 mm
  • Weight: 1116 gr


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
C Programming: A Modern Approach
WW Norton & Co -
C Programming: A Modern Approach
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

C Programming: A Modern Approach

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept

    New Arrivals

    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!