Effective C Cover

Effective C: An Introduction to Professional C Programming

by Robert C. Seacord
July 2020, 272 pp.
ISBN-13: 
9781718501041
Use coupon code PREORDER to get 25% off!

Download Chapter 2: OBJECTS, FUNCTIONS, AND TYPES


The world runs on code written in the C programming language, but most computer science programs only teach Java or Python as an introductory language. This book is for developers who already know how to program and want to quickly come up to speed on professional programming in C. You'll learn how to develop correct, portable, professional-quality code and build a foundation for developing security-critical and safety-critical systems.

Written by renowned author Robert Seacord, Effective C is an in-depth look at the C programming language. Seacord introduces the language's basic data types and code structures while simultaneously addressing best practices, common errors, and open debates in the C community. You'll also learn how to debug, test, and analyze C programs and benefit from detailed yet concise explanations of C language constructs and behaviors.

Learn:

  • How to identify and handle undefined behavior in a C program
  • The range and representations of integers and floating-point values
  • How integer promotions are performed and how they may affect portability
  • The order of evaluation of expressions
  • Dynamic memory allocation including the use of non-standard functions
  • The philosophy underlying the use of character types in C
  • Character encodings and types
  • How to perform input/output (I/O) with terminals and file systems using C Standard Streams and POSIX file descriptors
  • The translation phases implemented by the C compiler and the role of the preprocessor
  • How to test, debug, and analyze C programs

Developed in collaboration with C Standard Committee experts, Effective C will teach you how to write correct, portable, professional-quality C code.

Author Bio 

Robert Seacord is a Technical Director at NCC Group where he researches and teaches secure coding in C, C++, Java, and other languages. Seacord founded the secure coding initiative in the CERT Division of Carnegie Mellon University's Software Engineering Institute (SEI) and was an adjunct professor in the School of Computer Science and the Information Networking Institute at Carnegie Mellon University and at the University of Pittsburgh. He is an expert on ISO/IEC JTC1/SC22/WG14, the international standardization working group for the programming language C. He is also the author of six previous books, including The CERT C Coding Standard, Second Edition (2014), Secure Coding in C and C++, Second Edition (2013), The CERT Oracle Secure Coding Standard for Java (2011), and Java Coding Guidelines: 75 Recommendations for Reliable and Secure Programs (2014). Robert Seacord is on the Advisory Board for the Linux Foundation.

Table of contents 

Introduction

Chapter 1: Getting Started
Chapter 2: Objects, Functions, and Types
Chapter 3: Arithmetic Types
Chapter 4: Expressions and Operators
Chapter 5: Control Flow
Chapter 6: Dynamically Allocated Memory
Chapter 7: Characters and Strings
Chapter 8: Input/Output
Chapter 9: Preprocessor
Chapter 10: Program Structure
Chapter 11: Debugging, Testing, and Analysis

Index
All chapters are included in this Early Access PDF.
View the detailed Table of Contents

Reviews 

Effective C will teach you C programming for the modern era...

This book's emphasis on the security aspects of C programming is unmatched. My personal recommendation is that, after reading it, you use all of the available tools it presents to avoid undefined behavior in the C programs you write.
—Pascal Cuoq, Chief Scientist, TrustInSoft