To simplify and debug programming, large programs are divided into smaller subprograms called functions, each performing well-defined tasks. Initially, only the main() function was defined, but this unit will teach you to define and call multiple functions from main() to perform required processing. Functions are crucial for Modular Programming (a programming approach that breaks large programs into smaller, manageable subprograms or modules), reducing complexity and making programs easier to understand. This unit covers defining and accessing functions, different types of functions, invoking them, and the concept of Recursion, where a function calls itself.
Objective:
After going through this unit, you will learn: