Functions in C

C provides a lot of built in functions. Apart from that users define their own functions knows as user-defines functions. The function has got three parts
The declaration,the call and the definition.
Consider a function ‘getline’ which is used to obtain each line from the input.
The three parts of the function would be as follows:
Declaration:returntype getline(parameters);
call:getline(arguments);
definition:returntype getline(parameters)
{
declarations;
statements;
}

The function definition may well contain a ‘return’ statement to transfer the control back to the caller function. In such cases the return type of the function must not be ‘void’.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s