Function:- Function is a collection of instruction written in C language to perform some specific task. Every C program has at least one function which is main() ,each function having two parts prototype and body of the function. A function declaration (prototype) tells the compiler about a functions name, return type and parameters. A function definition provides the actual body of the function.
Declaration of function
Syntax :- return_type function_name(arg_type,arg_type);
Example :- int circle_area (float );
In other words
Self contained block of one or more statement or a sub program which is designed for a particular task is known as Function.
Function are classified into two types
- Library Function / Predefined Function
- User defined Function
0 Comments