The C compiler ordinarily requires C programs to be ordered such that each function's definition appears
before calls to that function appear. Thus, doubling_time
must be
defined before main
is defined, because main
contains a call
to doubling_time
.
The reason for requiring programs to be so ordered is that such ordering simplifies the development of efficient compilers.
Later, in the hardcopy version of this book, you learn that function prototypes make it possible to write programs in which function calls do appear before definitions. Until then, be sure that each function's definition appears before calls to that function appear.