Coding & Programming > Programming Forum

What is a function?


A function is a way of wrapping up a chunk of code and giving that chunk a name, so that you can use that chunk later in just one line of code. Functions are most useful when you will be using the code in more than one place, but they can be helpful even in one-use situations,
because they can make your code much more readable.

The function is nothing but a block in programming languages, It can be used to reusable code that is used to perform a single, related action. Functions provide better modularity for your application and a high degree of code reusing.

Functions are the main building blocks of a program. Because of functions a program is divided into small chunks of code. Functions are of two types user define functions and built in functions.


[0] Message Index

Go to full version