Chapter 1

C Overview and Program Structure

Abstract

This chapter explains the structure of C programs as it pertains to embedded microcontrollers. A short example program is used to introduce the reader to each of the basic C elements.

Compilation units (sometimes called translation units), functions, statements, compound statements, expressions, and data declarations are all introduced. The unique C preprocessor concept is covered with some simple preprocessor directive samples. This chapter shows how constants, variables, operators, and function calls make up the basic components of an expression and how they are used together in the C programming language. The basics of functions calls, including passing and returning data, are included. ...

Get Embedded C Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.