Types of functions in c language
The C language supports two types of functions:-
- Library/pre-defined function
- User-defined function
- The library functions are pre-defined set of functions. Their task is limited.
- User should not worry to understand the internal working of these functions.
- User can only use the functions but cannot change or modify them.
- Ex:- printf( );, scanf( );, sin( );, cos( );, etc..
- The functions defined by the user according to his/her requirement are called as user-defined functions.
- User can modify the function according to the requirement. User certainly understands the internal working of the function.
- User has full scope to implement his/her own ideas in the function. Thus, the set of such user-defined functions can be useful to another programmer.
- One should include the file in which the user-defined functions are stored to call the function in the program.
- Ex:- india( );, msg( ); etc..