liveBook · Manning

Chapter 9: Style

What you will learn in chapter 9 of Modern C, Third Edition

The chapter introduces readability as a requirement for C code and explains how human limits and project culture shape coding style.

After this chapter you will be able to

What it builds on

Section by section

Introduction

The chapter introduces readability as a requirement for C code and explains how human limits and project culture shape coding style.

Key terms: readable, intended behavior, short-term memory, field of vision, window, coding style, culture, cultural space

9.1 Formatting

This section explains why consistent C formatting helps people read code and why editors and project-wide tools should apply it automatically.

Key terms: formatting, white space, coding style, text editor, automatically format, formatting rules, formatting policy, command-line tools, differences between versions

9.2 Naming

This section explains how to choose C identifiers that avoid technical conflicts and communicate their purpose clearly.

Key terms: reserved identifier, header file, file scope, global space of identifiers, application programming interface, naming prefixes, macro, recognizable, distinguishable, scope

9.3 Internationalization, so to speak

This section explains how project language choices and Unicode identifier rules can make C code appropriate and readable for different communities.

Key terms: natural language, project, variable and function names, code comments, technical language, domain-specific problems, mathematical notation, documentation, C23, UAX #31

9.4 Summary

Where this is used later

Concepts explained in this chapter

← Chapter 8: C library functions Chapter 10: Organization and documentation →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.