Wednesday 24 April 2019

Why are User defined Functions used? tccicomputercoaching.com

There are 2 types of functions in Programming .

Built in and User Defined Function.

Built in means already written, tested and stored in one file.
User Defined Function user develop, compile and run at a time.

Definition:

User-defined functions allow the programmer and “user”—to put same code together that performs one “function".

We divide one complex and lengthy task in different modules. So, there are so many advantages.


Advantages of User Defined Function:

1. It would be easy to solve errors module wise.

2. Reuse the code in your function.

3. You get easier to read code,

a. Since you don’t mix the what (should be done) with thehow (it should be done) everywhere. Instead, you just say what you want by calling your lower level function and that deals with the details of how it must do its work.

4. Decreases the length of the programme.

5. The smaller user defined functions can be more easily tested or replaced by improved versions.

6. We can just call when it need in programme , don't need to repeat code again.

a. Because it is an implementation of some action wrapped in an interface (the name and the defined set of inputs and outputs). Once you’ve defined it, you can call it in other places in your code without caring about how it does what it does; all you need to know is the interface and purpose.

TCCI Coaching Institute is located in Bopal and Satellite in Ahmedabad. We teach various Programming Languages, Engineering course , Web Designing, basic Computer course etc.

To know in detail about TCCI.

Call us @ 9825618292

Visit us @ http://tccicomputercoaching.com/course/

No comments:

Post a Comment