What are the advantage of User Defined Function?
When any program is very lengthy and complex then we divide the process into different modules.
In a USER DEFINED FUNCTION, there are mainly used to perform various tasks (functions).
Its advantage is that:
- It brings modularity to the code.
- It allows us to segregate tasks. Divide a Big task into smaller tasks (Divided & Conquer) and thus make it manageable. Solve the small ones to get the answer of the big whole.
- The subprogram is easier to write, understand and debug.
- In C, a function can call itself again. It is called a recursive function. Many calculations can be done easily by using recursive functions such as calculation of factorial of a number, etc.
- Reduction in size of the program due to the program code of a function can be used again and again, by calling it.
- The complexity of the entire program can be divided into simple subtask and then function subprograms can be written for each subtask.
- A library of a function can be designed and tested for use of every programmer.
To learn C Programming Languages and other programming Languages at TCCI.
call us @ 98256 18292.
Visit us @ http://tccicomputercoaching.co m/