What are the necessities or advantages of user defined functions?

Author: Tanmay Chakrabarty

First Published On: Monday, April 13, 2015 at 1:14 PM

Necessity of user defined functions : When not using user defined functions, for a large program the tasks of debugging, compiling etc may become difficult in general. That’s why user defined functions are extremely necessary for complex programs. The necessities or advantages are as follows,

  1. It facilitates top-down modular programming. In this programming style, the high level logic of the overall problem is solved first while the details of each lower-level function are addressed later.
  2. The length of a source program can be reduced by using functions at appropriate places.
  3. It is easy to locate and isolate a faulty function for further investigations.
  4. A function may be used by many other programs. This means that a C programmer can build on what others have already done, instead of starting all over again from scratch.



Contact Us