Function
A function is self-contained block of statements that performs particular task. C functions can be classified into two types:
• Library functions
• User-defined functions
The library functions are the functions which are already defined in C’s functions library i.e. header files. For example, the functions scanf() and printf() are the library functions defined in file stdio.h same as functions sqrt() is defined in math.h and getch() is defined in conio.h. User defined
function is the function defined by the programmer who has written the program. The task to perform is decided by the user. For example, the main() function is an user-defined function. We decide what is to be written in this function.
No comments:
Post a Comment