Chapter 7

Exercise 7.1

#define MAXLEN 100

Exercise 7.2

In expressions, there may be precedence problems. A safer definition would be #define VALUE (100+MAXLEN).

Exercise 7.3

#define REM(a,b) ((a)%(b))

Exercise 7.4

#define REM(a,b) ((long)(a)%(long)(b))

Exercise 7.5

It generally signifies a library header file.

Exercise 7.6

It generally signifies a private header file.

Exercise 7.7

By using the conditional compilation directives. Examples are shown in the text.

Exercise 7.8

It uses long int in place of int and unsigned long int, in place of unsigned int using the arithmetic environment provided by the translator, not the target. It must provide at least the ranges described in <limits.h>.