2 Differentiate between User Defined Functions and Library Functions.
Answers
Differentiate between User Defined Functions and Library Functions.
A user-defined function (UDF) is a function provided by the user of a program or environment, in a context where the usual assumption is that functions are built into the program or environment.
library functions are the ones that are predefined. like printf(), scanf() etc. Various useful tasks such as I/O operations or math operations are carried out using various library functions. In order to use these library functions you need to import appropriate header files.
HOPE THIS HELPS YOU ❤️
User-defined Functions
• These function are created by user as per their own requirement.
• User-defined functions are not stored in library file.
• Execution of the program begins from the user-define function.
• Example: sum(), fact(),…etc.
Library Functions
• These functions are not created by user as their own.
• Library Functions are stored in special library file.
• Execution of the program does not begin from the library function.
• Example: printf(), scanf(), sqrt(),…etc.