Define functions. Write the advantages of function with program example.
Afunctionis basically a block of statements that performs a particular task. Suppose a task needs to be performed continuously on many data at different points of time, like one at the beginning of the program and one at the end of the program, so instead of writing the same piece of code twice, a person can simply write it in a function and call it twice. And after the execution of any function block, the control always comes back to themain()function.
Here are several advantages of using...