Only a computer will love it. A function is a piece of code that performs a task. A C program is basically a collection of functions. Functions are called by other functions, which means a service is being requested which is provided by the called function. Functions can return something to the caller, perform a process or both.
Functions can also accept arguments inside the parentheses following the function name.
That's true of any function. The code belonging to a function is placed inside curley braces. We will make it return an integer that is what we send it squared. Before we use it however, we must describe it. This is accomplished with what is called a prototype .