A function is a group of statements that together perform a task. A function is a set of statements that take inputs, perform specific computations, and produce output.

There are two types of  Function

1. Library Function (pre-define function)
2. User-Define function

Calling of Function

1. Call by Value
2. Call by reference

Way of function Definition
1. Takes nothing Return nothing
2. Takes nothing Return something
3. Takes something Return nothing
4. Takes something Return something

Benefits of Function

1. Modularization
2. Easy to read
3. Easy to debug
4. Easy to Modify
5. Avoids rewriting of same code over and over
6. Better memory utilization

Watch the Video Lecture


            Previous                                                                                                                       Next