Functions In C Language
Functions are subprograms which are used to compute a value or perform a task. They cannot be run independently and are always called by the main( ) function or by some other function.
C functions can be classifieds into two categories,

•  Library or built-in functions
•  User-defined functions 

Library functions are those functions which are defined by C library, example printf(), scanf(), strcat() etc. You just need to include appropriate header files to use these functions. These are already declared and defined in C libraries.

User-defined functions are those functions which are defined by the user at the time of writing program. Functions are made for code reusability and for saving time and space.


1. Functions are very much useful when a block of statements has to be written/ executed again and again.

2. Functions are useful when the program size is too large or complex. It is like a top-down Modular programming technique to solve a problem

3. Functions are also used to reduce the difficulties during debugging a program.