So far in this book you have seen simple programs where all programming effort is contained in
main(). This works very well for really small programs and applications. The larger and more complex your program gets, the longer the contents of
main() becomes, unless you choose to structure your program using functions.
Functions give you a way to compartmentalize and organize your program’s execution logic. They enable you to split the contents of your application into logical blocks that are invoked sequentially.
A function is hence a subprogram that optionally takes parameters and returns a value, and it needs to be invoked to perform its task. In this lesson you learn
• The need for programming functions ...