C Programming Essentials

Book description

C Programming Essentials is specifically designed to be used at the beginner and intermediate level. The book is organized around language as the tool for design and programming and library functions. It demonstrates key techniques that make C effective and focuses on the fundamental concepts necessary for mastery. An introduction to C99 is also provided.

Table of contents

  1. Cover
  2. Title Page
  3. Contents
  4. Dedication
  5. Preface
  6. 1. Introduction
    1. 1.1 Software
    2. 1.2 Systems Software
    3. 1.3 Application Software
    4. 1.4 Program Development Process
    5. 1.5 Algorithms
    6. 1.6 Analysis of Algorithms
    7. 1.7 Flowcharts
    8. 1.8 Programming Language Classifications
    9. 1.9 Programming Techniques
    10. 1.10 Structured Programming Constructs
    11. 1.11 History of C Language
    12. 1.12 C Language Overview
      1. Summary
      2. New Terminology Checklist
      3. Exercises
  7. 2. The Foundation of C
    1. 2.1 Memory and Storage
    2. 2.2 C Character Set
    3. 2.3 C Keywords
    4. 2.4 Whitespaces in C
    5. 2.5 Data Types
    6. 2.6 C Constants
    7. 2.7 Variables
    8. 2.8 A Peek at Functions
    9. 2.9 Useful Identifier-Naming Conventions
    10. 2.10 Type-Declaration Statements
    11. 2.11 Operators
    12. 2.12 Operator Precedence
    13. 2.13 Type Conversion in Expressions
    14. 2.14 Type Conversion in Assignments
    15. 2.15 Type Casting
    16. 2.16 Comments
    17. 2.17 Functions Revisited
    18. 2.18 Putting It Together (First C Program)
    19. 2.19 Some Standard Library I/O Functions
    20. 2.20 Scope of Identifiers
    21. 2.21 Storage Classes
    22. 2.22 Storage Type Qualifiers
      1. Summary
      2. New Terminology Checklist
      3. Exercises
  8. 3. Control
    1. 3.1 The if Statement
    2. 3.2 The switch Statement
    3. 3.3 The for Statement
    4. 3.4 The while Statement
    5. 3.5 The do-while Statement
    6. 3.6 The break and continue Statement
    7. 3.7 The Infamous goto
      1. Summary
      2. New Terminology Checklist
      3. Exercises
  9. 4. Functions and Recursion
    1. 4.1 Introduction
    2. 4.2 Function Arguments
    3. 4.3 The return Statement Revisited
    4. 4.4 Call-By-Value
    5. 4.5 Stacks in Function Calls
    6. 4.6 Recursion
    7. 4.7 Towers of Hanoi—Case Study of Recursion
    8. 4.8 Efficiency Considerations for Use of Functions
      1. Summary
      2. New Terminology Checklist
      3. Exercises
  10. 5. Arrays
    1. 5.1 Need for Arrays
    2. 5.2 Single-Dimensional Arrays
    3. 5.3 Single-Dimensional Array Initialization
    4. 5.4 Multi-Dimensional Arrays
    5. 5.5 Matrices
    6. 5.6 Row-Major and Column-Major Order
    7. 5.7 Single-Dimensional Character Arrays (Strings)
    8. 5.8 Initialization of Strings
    9. 5.9 gets( ) and puts( )
    10. 5.10 sscanf( ) and sprintf( )
    11. 5.11 String Functions
    12. 5.12 Two-Dimensional Character Arrays
      1. Summary
      2. New Terminology Checklist
      3. Exercises
  11. 6. Pointers
    1. 6.1 Defining a Pointer
    2. 6.2 Scalars for Pointers
    3. 6.3 Pointer Assignments and Expressions
    4. 6.4 Pointer Comparison
    5. 6.5 Passing Pointers to Functions
    6. 6.6 Pointers and Arrays—Pointer Arithmetic
    7. 6.7 Pointers and Two-Dimensional Arrays
    8. 6.8 Arrays of Pointers
    9. 6.9 Pointers to Pointers
    10. 6.10 Pointers to Functions
    11. 6.11 Command-Line Arguments
    12. 6.12 Other Pointer Issues
      1. Summary
      2. New Terminology Checklist
      3. Exercises
  12. 7. User-Defined Data Types
    1. 7.1 Structures
    2. 7.2 Declaring a Structure
    3. 7.3 Defining a Structure Variable
    4. 7.4 Initializing and Referencing Structure Members
    5. 7.5 Nesting of Structures
    6. 7.6 Operations on Structures
    7. 7.7 Pointers to Structures
    8. 7.8 Structures and Functions
    9. 7.9 Arrays of Structures
    10. 7.10 Self-Referential Structures
    11. 7.11 Unions
    12. 7.12 Enumerated Data Types
    13. 7.13 Typedef
    14. 7.14 Bit Fields
      1. Summary
      2. New Terminology Checklist
      3. Exercises
  13. 8. File Access and Processing
    1. 8.1 Introduction
    2. 8.2 Opening and Closing a Disc File
    3. 8.3 Character Input/Output
    4. 8.4 Error-Handling
    5. 8.5 Reading and Writing a File in Convenient Chunks
    6. 8.6 File Positioning
      1. Summary
      2. New Terminology Checklist
      3. Exercises
  14. 9. The C Preprocessor
    1. 9.1 Macro Substitution
    2. 9.2 File Inclusion
    3. 9.3 Conditional Compilation
    4. 9.4 Additional Directives
    5. 9.5 Predefined Preprocessor Identifiers
    6. 9.6 ANSI Standard Header files
      1. Summary
      2. New Terminology Checklist
      3. Exercises
  15. Appendix-A: Common Errors in C
  16. Appendix-B : More on Bitwise Operators in C
  17. Appendix-C: Some Useful Functions from stdlib.h
  18. Appendix-D: Creating Static Library with gcc
  19. Appendix-E: C99—A Brief Introduction
  20. Appendix-F: Practice Problems Index
  21. Notes
  22. Acknowledgements
  23. Copyright

Product information

  • Title: C Programming Essentials
  • Author(s): Kashi Nath Dey, Samir Bandyopadhyay
  • Release date: April 2010
  • Publisher(s): Pearson India
  • ISBN: 9788131770894