C++ Functions and its Prototypes
A function groups a number of program statements into a unit and provides it a name. This unit could then be invoked from other categories of the program. It is used to decrease program size. The function's code is stored in just one place in memory; even by the function is executed several times in the course of program.
The major advantages of using a function are:
1. Simple to write a correct small function
2. Simple to read, write and debug a function
3. simpler to manage or modify such a function
4. Small functions tend to be itself documenting and highly readable
5. It can be called any number of times in any place with different parameters