Function is basically a set of statements that takes inputs, performs some computation, and produces output. There are many situations where we might need to write the same line of code more than once in a program. So, C language provides an approach in which you can declare and define a group of statements once in the form of a function and it can be called and used whenever required.