Function declaration in C

Function declaration in C –¬†Every function has its declaration and function definition. When we talk of declaration only, it means only the function name, its argument list and return type are specified and the function body or definition is not attached to it.

The syntax of a function declaration in C Language

return datatype function_name (list of arguments);

 

For example,

float temperature(float c, float f);

The first line of the temperature function definition tells the compiler that the function returns float, its name is temperature, and that it takes two float arguments c and f.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: