Define a function. List various advantages of a function.

8. B) Define a function. List various advantages of a function.

Answers:-

Functions are independent program modules that are designed to carry out a particular
task
.”

In functions we have two types:

  1. Built-in (Library) functions
  2. User-defined functions

Advantages of using Functions:
1. Managing huge programs and software packages is easier by dividing them into functions/modules—Maintenance is easier

2. Error detection is easier—Debugging is easier

3. Functions are once written can be reused in any other applications – Reusability is enhanced

4. We can protect our data from illegal users—Data protection becomes easier

Leave a Reply

Your email address will not be published. Required fields are marked *