
Overview of C++ 237
8.17.2 Functions
A function is a self-contained block or
a sub-program of one or more state-
ments that perform a special task
when called. The C++ functions are
more civilized than C. It is possible to
use the same name with multiple defi-
nitions called as function overloading.
Figure 8.16 illustrates the function. In
Figure 8.16, funA() and funB()
are two user-defined functions. These
are invoked from the body of main.
After execution of the funA()and
funB() the program control returns
back to the calling function main().
A simple program on function is
described below.
Write a program to use pointers.
# include <conio.h> ...