+2 votes
in Class 11 by kratos

Explain the various advantages of functions.

1 Answer

+1 vote
by kratos
 
Best answer

1. Modularity:

Functions can be used to divide a large bulky program into functionally independent modules or subprograms.

2. Universal use:

User-defined functions can be made a part of a library, which in turn, facilitates the usage of that function across other ‘C++’ programs.

3. Code Reusability:

Writing the same sequence of code at .two or more locations in the program can be avoided with the use of functions and universal use feature reduces repeated rewriting of codes.

4. Teamwork:

Functions promote teamwork. They Divide a large bulky program into functionally independent modules and each person in the team can develop a separate subprogram. 5. Reduction in program size: Reduces the overall program size.

6. Easy Debugging:

Easy to detect errors and correct them in a module

...