C Programming language-C Function Arguments

C Function Arguments

While calling the function, the arguments are passed in two ways such as
  • Call by Value
  • Call  by Reference

Call by Value:

This is a straight-forward which copies the actual value of an argument into the formal parameter of the function. In this case, when the value is changed inside the function has no effect on the argument passed during the Function Call.

Call by Reference:

This method copies the address value of the variable to the Function. In this case, the value changed inside the Function will also change the actual argument used in the Function call. 

In default, the C uses call by value to pass arguments.