Book description
The professional programmer’s Deitel® guide to procedural programming in C through 130 working code examples
Written for programmers with a background in high-level language programming, this book applies the Deitel signature live-code approach to teaching the C language and the C Standard Library. The book presents the concepts in the context of fully tested programs, complete with syntax shading, code highlighting, code walkthroughs and program outputs. The book features approximately 5,000 lines of proven C code and hundreds of savvy tips that will help you build robust applications.
Start with an introduction to C, then rapidly move on to more advanced topics, including building custom data structures, the Standard Library, select features of the new C11 standard such as multithreading to help you write high-performance applications for today’s multicore systems, and secure C programming sections that show you how to write software that is more robust and less vulnerable. You’ll enjoy the Deitels’ classic treatment of procedural programming. When you’re finished, you’ll have everything you need to start building industrial-strength C applications.
Practical, example-rich coverage of:
C programming fundamentals
Compiling and debugging with GNU gcc and gdb, and Visual C++®
Key new C11 standard features: Type generic expressions, anonymous structures and unions, memory alignment, enhanced Unicode® support, _Static_assert, quick_exit and at_quick_exit, _Noreturn function specifier, C11 headers
C11 multithreading for enhanced performance on today’s multicore systems
Secure C Programming sections
Data structures, searching and sorting
Order of evaluation issues, preprocessor
Designated initializers, compound literals, bool type, complex numbers, variable-length arrays, restricted pointers, type generic math, inline functions, and more.
Visit www.deitel.com
For information on Deitel’s Dive Into® Series programming training courses delivered at organizations worldwide visit www.deitel.com/training or write to deitel@deitel.com
Download code examples
To receive updates for this book, subscribe to the free DEITEL® BUZZ ONLINE e-mail newsletter at www.deitel.com/newsletter/subscribe.html
Join the Deitel social networking communities on Facebook® at facebook.com/DeitelFan, Twitter® @deitel, LinkedIn® at bit.ly/DeitelLinkedIn and Google+™ at gplus.to/Deitel
Table of contents
- About This eBook
- Title Page
- Copyright Page
- Deitel® Series Page
- Dedication Page
- Contents
- Preface
- 1. Introduction
- 2. Introduction to C Programming
-
3. Control Statements: Part I
- 3.1. Introduction
- 3.2. Control Structures
- 3.3. The if Selection Statement
- 3.4. The if...else Selection Statement
- 3.5. The while Repetition Statement
- 3.6. Class Average with Counter-Controlled Repetition
- 3.7. Class Average with Sentinel-Controlled Repetition
- 3.8. Nested Control Statements
- 3.9. Assignment Operators
- 3.10. Increment and Decrement Operators
- 3.11. Secure C Programming
-
4. Control Statements: Part II
- 4.1. Introduction
- 4.2. Repetition Essentials
- 4.3. Counter-Controlled Repetition
- 4.4. for Repetition Statement
- 4.5. for Statement: Notes and Observations
- 4.6. Examples Using the for Statement
- 4.7. switch Multiple-Selection Statement
- 4.8. do...while Repetition Statement
- 4.9. break and continue Statements
- 4.10. Logical Operators
- 4.11. Confusing Equality (==) and Assignment (=) Operators
- 4.12. Secure C Programming
-
5. Functions
- 5.1. Introduction
- 5.2. Program Modules in C
- 5.3. Math Library Functions
- 5.4. Functions
- 5.5. Function Definitions
- 5.6. Function Prototypes: A Deeper Look
- 5.7. Function Call Stack and Stack Frames
- 5.8. Headers
- 5.9. Passing Arguments By Value and By Reference
- 5.10. Random Number Generation
- 5.11. Example: A Game of Chance
- 5.12. Storage Classes
- 5.13. Scope Rules
- 5.14. Recursion
- 5.15. Example Using Recursion: Fibonacci Series
- 5.16. Recursion vs. Iteration
- 5.17. Secure C Programming
- 6. Arrays
-
7. Pointers
- 7.1. Introduction
- 7.2. Pointer Variable Definitions and Initialization
- 7.3. Pointer Operators
- 7.4. Passing Arguments to Functions by Reference
- 7.5. Using the const Qualifier with Pointers
- 7.6. Bubble Sort Using Pass-by-Reference
- 7.7. sizeof Operator
- 7.8. Pointer Expressions and Pointer Arithmetic
- 7.9. Relationship between Pointers and Arrays
- 7.10. Arrays of Pointers
- 7.11. Case Study: Card Shuffling and Dealing Simulation
- 7.12. Pointers to Functions
- 7.13. Secure C Programming
-
8. Characters and Strings
- 8.1. Introduction
- 8.2. Fundamentals of Strings and Characters
- 8.3. Character-Handling Library
- 8.4. String-Conversion Functions
- 8.5. Standard Input/Output Library Functions
- 8.6. String-Manipulation Functions of the String-Handling Library
- 8.7. Comparison Functions of the String-Handling Library
- 8.8. Search Functions of the String-Handling Library
- 8.9. Memory Functions of the String-Handling Library
- 8.10. Other Functions of the String-Handling Library
- 8.11. Secure C Programming
-
9. Formatted Input/Output
- 9.1. Introduction
- 9.2. Streams
- 9.3. Formatting Output with printf
- 9.4. Printing Integers
- 9.5. Printing Floating-Point Numbers
- 9.6. Printing Strings and Characters
- 9.7. Other Conversion Specifiers
- 9.8. Printing with Field Widths and Precision
- 9.9. Using Flags in the printf Format Control String
- 9.10. Printing Literals and Escape Sequences
- 9.11. Reading Formatted Input with scanf
- 9.12. Secure C Programming
-
10. Structures, Unions, Bit Manipulation and Enumerations
- 10.1. Introduction
- 10.2. Structure Definitions
- 10.3. Initializing Structures
- 10.4. Accessing Structure Members
- 10.5. Using Structures with Functions
- 10.6. typedef
- 10.7. Example: High-Performance Card Shuffling and Dealing Simulation
- 10.8. unions
- 10.9. Bitwise Operators
- 10.10. Bit Fields
- 10.11. Enumeration Constants
- 10.12. Secure C Programming
-
11. File Processing
- 11.1. Introduction
- 11.2. Files and Streams
- 11.3. Creating a Sequential-Access File
- 11.4. Reading Data from a Sequential-Access File
- 11.5. Random-Access Files
- 11.6. Creating a Random-Access File
- 11.7. Writing Data Randomly to a Random-Access File
- 11.8. Reading Data from a Random-Access File
- 11.9. Case Study: Transaction-Processing Program
- 11.10. Secure C Programming
- 12. Data Structures
-
13. Preprocessor
- 13.1. Introduction
- 13.2. #include Preprocessor Directive
- 13.3. #define Preprocessor Directive: Symbolic Constants
- 13.4. #define Preprocessor Directive: Macros
- 13.5. Conditional Compilation
- 13.6. #error and #pragma Preprocessor Directives
- 13.7. # and ## Operators
- 13.8. Line Numbers
- 13.9. Predefined Symbolic Constants
- 13.10. Assertions
- 13.11. Secure C Programming
-
14. Other Topics
- 14.1. Introduction
- 14.2. Redirecting I/O
- 14.3. Variable-Length Argument Lists
- 14.4. Using Command-Line Arguments
- 14.5. Notes on Compiling Multiple-Source-File Programs
- 14.6. Program Termination with exit and atexit
- 14.7. Suffixes for Integer and Floating-Point Literals
- 14.8. Signal Handling
- 14.9. Dynamic Memory Allocation: Functions calloc and realloc
- 14.10. Unconditional Branching with goto
- A. Operator Precedence Chart
- B. ASCII Character Set
-
C. Number Systems
- C.1. Introduction
- C.2. Abbreviating Binary Numbers as Octal and Hexadecimal Numbers
- C.3. Converting Octal and Hexadecimal Numbers to Binary Numbers
- C.4. Converting from Binary, Octal or Hexadecimal to Decimal
- C.5. Converting from Decimal to Binary, Octal or Hexadecimal
- C.6. Negative Binary Numbers: Two’s Complement Notation
- D. Sorting: A Deeper Look
-
E. Additional Features of the C Standard
- E.1. Introduction
- E.2. Support for C99
- E.3. C99 Headers
- E.4. Mixing Declarations and Executable Code
- E.5. Declaring a Variable in a for Statement Header
- E.6. Designated Initializers and Compound Literals
- E.7. Type bool
- E.8. Implicit int in Function Declarations
- E.9. Complex Numbers
- E.10. Variable-Length Arrays
- E.11. Additions to the Preprocessor
- E.12. Other C99 Features
- E.13. New Features in the C11 Standard
- E.14. Web Resources
- F. Using the Visual Studio Debugger
- G. Using the GNU Debugger
- Index
Product information
- Title: C for Programmers with an Introduction to C11
- Author(s):
- Release date: April 2013
- Publisher(s): Pearson
- ISBN: 9780133462081
You might also like
book
Programming C# 10
C# is undeniably one of the most versatile programming languages available to engineers today. With this …
book
C Programming Absolute Beginner’s Guide, Third Edition
Updated for C11 Write powerful C programs… without becoming a technical expert! This book is the …
book
Learn C Programming - Second Edition
Get started with writing simple programs in C while learning core programming concepts Key Features Learn …
book
Practical C Programming
A comprehensive guide with practical instructions for learning data structures, low-level programming, high-performance computing, networking and …