-- Programming Language Books and Training

 C C++ Java

Books by K. N. King

Books by K. N. King
Short courses
Recommended books
Recommended links

C Programming: A Modern Approach (Second Edition)

Chapter 15

Answers to Selected Exercises

2. [was #2] (b). Function definitions should not be put in a header file. If a function definition appears in a header file that is included by two (or more) source files, the program can't be linked, since the linker will see two copies of the function.

6. [was #8]

(a) main.c, f1.c, and f2.c.
(b) f1.c (assuming that f1.h is not affected by the change).
(c) main.c, f1.c, and f2.c, since all three include f1.h.
(d) f1.c and f2.c, since both include f2.h.

Copyright © 2008, 1996 W. W. Norton & Company, Inc. All rights reserved.