What are the main advantages of functions?
Answers
Answered by
7
There are several advantages in using function...Functions allow the divide and conquer strategy to be used for the development of programs. When developing even moderately sized program, it is very difficult if not impossible, to write the entire program as a single large main FUNCTION.
Answered by
8
Function:
A function is a part of statements to perform a particular task.
Advantages:
- Usage of functions will enhance the readability of a program.
- Breaking code into smaller functions will make the program organized, easy to understand, and reusable.
- This avoids repetition of the same code and chances of error.
- Once the function is executed, the control will be back to the main function. This method is known as modularity which reduces the complexity of the program.
Similar questions
History,
7 months ago
Computer Science,
7 months ago
Physics,
7 months ago
Computer Science,
1 year ago
Biology,
1 year ago
Science,
1 year ago
Math,
1 year ago