explain function and benefits of function


Function and Benefits of function


•Functions

–Modularize a program
–All variables declared inside functions are local variables
•Known only in function defined
–Parameters
•Communicate information between functions
•Local variables

•Benefits of functions

–Divide and conquer
•Manageable program development
–Software reusability
•Use existing functions as building blocks for new programs
•Abstraction - hide internal details (library functions)
–Avoid code repetition

Labels: