• admin@embedclogic.com

Function Calling In C

Function Calling

Function calling is the component of the function used to call any user or library defined function inside main.

Syntax

return_type function_name(input1_dataType,input2_dataType);

Types of Function Calling

Function calling has several types on the basis of input and output parameter –

— Function call with no input and no output

— Function call with input but no output

— Function call with no input but some output

— Function call with some Input and some output

Function call with no input and no output

— return_type    : void 

— input1,input2 : void 

Syntax

function_name();

Example:

Program for addition of two unsigned number by function calling
Function call with some input but no output

return_type    : void 

input1 , input2 : variable or some constant value

Syntax

  function_name(input1,input2,…..inputn);

Example

Program to find 3 digit Armstrong Number by function calling
Function Calling With no input but returns some output 

return_type    : some data type

input1,input2 : No input param

Syntax

  result=function_name();

Example:

main function with no input parameter and an integer return.

Function call with no input and no output

return_type: any data type

input1,input2 : value

Syntax

function_name(input1,input2);

Example:

Program for addition of two unsigned number by function calling

Subscribe and stay updated with our latest articles.

You have successfully subscribed to the newsletter

There was an error while trying to send your request. Please try again.

Embedclogic will use the information you provide on this form to be in touch with you and to provide updates and marketing.