1- What are the Functions?
The same definition as mathematic's functions or calculus functions. They're
code fragments packaged with a name, they can accept input data and at the end
return data.
2- Why we are using the Functions?
Because we can re-use code grouping code in functions and later call it in other
program part.
3- What is the Types of Functions?
Functions are functions there are no function kinds or classifications.
It follows this scheme:
return_value_type FUNCTION_NAME (parameter_type PARAMETER_NAME)
{
....
CONTENT
....
return RETURN_VALUE;
}
In Pascal the functions that don't return values or don't accept parameters are
called procedures but in C/C++ functions are like this.
Go to this web-site if you need a gentle C++ introduction quickly:
http://www.cplusplus.com/doc/tutorial/functions/
In here you will find learn by examples.
Another reference for beginners is the Thinking in C++ from the C++ guru and
motivator Bruce Eckel: http://mindview.net/Books/TICPP/ThinkingInCPP2e.html
You can download these in the same web-site free of charge.
And at last you can get the C programming for dummies it's the best resource for
beginner students with little time.