Passing a Structure to a Function
Learn how to pass a structure and its elements to a function.
We'll cover the following...
We'll cover the following...
Passing structure elements
We can pass elements of a structure either by value or by reference.
Passing structure elements by value
The basic syntax of passing elements of a structure by value is given below:
functionName (structVariable.memberName);
See the code given below!
A pure call by value is not possible here, since we cannot pass the array, n, by value. It would always be passed by reference. ...