Posted in All Posts, Semester 2

Parts of a Function in C

Previously, we had studied What are Functions and their Types. Today we will know the parts of a function.

There are 3 parts in a function.
1. Function Declaration
2. Function Calling
3. Function Definition

Function Declaration

Function declaration includes the return type, name and the argument list of the function. Declaration of the function is done above main() function. Function  declaration is also called function prototype.

Syntax:  return_type function_name (argument list [data type])

Function Calling

It is the statement or part where the function is called.

Syntax:  function_name(argument list to pass);

Function Definition

Function definition is basically the code or logic of the function.

Syntax:

Program to show the parts of a function to print “Welcome” :

We hope that you found this article to be helpful.
Please share your thoughts in the Comments Section.

If you liked this article, then please like our Facebook page.

Suggested Reading

Comment your thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.