How are pramaters in c passed?

how are pramaters in c passed ?

1 Like

Important methods of Parameter Passing in C are:

  1. Pass by Value: This method uses in-mode semantics. Changes made to formal parameter do not get transmitted back to the caller. Any modifications to the formal parameter variable inside the called function or method affect only the separate storage location and will not be reflected in the actual parameter in the calling environment. This method is also called as call by value.

  2. Pass by reference(aliasing): This technique uses in/out-mode semantics. Changes made to formal parameter do get transmitted back to the caller through parameter passing. Any changes to the formal parameter are reflected in the actual parameter in the calling environment as formal parameter receives a reference (or pointer) to the actual data. This method is also called as < em>call by reference . This method is efficient in both time and space.

To know more, please refer to this article