Computer Science, asked by PragyaTbia, 1 year ago

What are the main advantages of functions?

Answers

Answered by tanishqkaur
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 letmeanswer12
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