Predefined Functions

Think of a function like a recipe in a cookbook. You have a set of ingredients (inputs) and instructions (code) to follow. When you want to make a specific dish (achieve a specific task), you look up the recipe (call the function) and follow the steps. You get the final dish (result) without needing to remember all the details of how it's made. Functions help organize and reuse code, making it more manageable and efficient.


Built-in Fuction Example (strlen):

The message: "Looks, like you are the winner!"
The length of the message: 31

User-defined Function Example:

Hello, Ben!