Below is an example of a built-in function using strlen().
The phrase "I love to count!" contains 16 characters.
Below is an example of user-defined function.
This function aims to print out the full names of the Smith family by passing the first names of family members into the function.
Jane Smith.
Frank Smith.
Paul Smith.
Tom Smith.
Mary Smith.
This is another example of a user-defined function which returns the result of adding two numbers.
5 + 10 = 15
7 + 13 = 20
2 + 4 = 6
The function are blocks of code that can be reused that performs tasks, making code easier to manage and eliminates redudancies. Built-in functions are ready to use without definition. User-defined functions are custom funnctions created for specific tasks.