Computer Science, asked by shriharikurva1906, 11 months ago

State the difference between library functions and user-defined functions.

Answers

Answered by harvvii
2
Library functions in C language are inbuilt functions which are grouped together and placed in a common place called library. All C standard library functions are declared in many header files which are saved as file_name.h. Actually, function declaration, definition for macros are given in all header files.

A user defined function is a programmed routine that has its parameters set by the user of the system. User defined functions often are seen as programming shortcuts as they define functions that perform specific tasks within a larger system, such as a database or spreadsheet program.
Answered by jeehelper
1

Library functions are those functions which are accessed just by writing their name, followed by some optional arguments.

For example, rect(t) function is library function for a rectangular pulse in MATLAB.

On the other hand, user-defined functions are those functions which must be defined by the user to get his job done. For example,

                                      F(t) = x*t  

It is a user defined function. To get value of “F” we must provide values of “x” and “t”.

Similar questions