8

The C Preprocessor

Learning Objectives

In this chapter, you will learn about:

  • Translators and their classification

  • Phases of translation

  • Trigraph replacement, line splicing and tokenization

  • Macros and its types

  • Token replacement and token pasting

  • Predefined macros

  • Source file inclusion and line control directive

  • error directive

  • pragma directive

  • Null directive

8.1 Introduction

In the previous chapters, you have developed several programs using C language, which is a high-level language. However, you will be surprised to know that the computer (i.e. the machine) cannot understand high-level languages. It can only understand machine-level languages, which are in the form of 1’s and 0’s. Humans do not want to write programs in machine-level ...

Get Programming in C: A Practical Approach, First Edition 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.