Different between Library and user define function in C

Different between Library and user define function in C

Difference between library and user define function in C 

Library function

User define function

Library functions are pre-defined function, which is already written compile and placed in the C library.  

 

User define function is defined by users at the time of programming.

The function name, return type, arguments and types have been already defining.

 

The users have the choice to choose its name, return type, arguments, and their type.

Library function requires a header file to use it.

 

User define function requires a function prototype to use it.

Library function helps to reduce the size of the program.

 

The program using user define function will be usually lengthy.

It is called at run time.  

 

It is called compile time.

Program development time is faster.

Program development time is slower than the library function.

 

The name of the library function cannot be changed.


The name of the user define function can be changed at any time.

Examples:- printf(), scanf(), strlen(),strcpy(), strcat(), gets() etc

 

Examples:- area(), evenodd(), prime() etc

 Also, check

Function in C


Post a Comment

0 Comments