A function definition contains function name, parameters, its code and return type and A function declaration contains only name and return type.
User can define a function only once but it can be declared several times.
declaration of function
Syntax :
< return_type> < function_name>(arguments... );
/* Declaration of area() */
int area(int x, int y);
int main()
{
int x=10, y=25; printf(''%d\n'',area(x,y)));
return 0;
}
Definition of function
syntax
< return_type> < function_name>(arguments)
{
Body of function;
}
/* Definition of area() */
int area(int x, int y)
{
int z;
z = x*y;
retrun z; }
About goddem
Templatesyard is a blogger resources site is a provider of high quality blogger template with premium looking layout and robust design. The main mission of templatesyard is to provide the best quality blogger templates which are professionally designed and perfectlly seo optimized to deliver best result for your blog.
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment