Home » Archives for November 28th, 2009
Passing Structure to Functions
Passing Structures to Functions:
The structures can also be passed as arguments to a function. If a structure is to be passed to a function, then it must be defined before the declaration of the function that uses the structure type data as argument.
The program example given below explains the use of structure type data as argument of a function.
Program:
...
C++ Array Arguments
Passing Array as Arguments to a Function:
An array variable can also he passed to the function as an argument. When an array is passed to the function only the starting address of the array is passed to the function. The C++ does not make a separate copy of the array in the body of the function. It only assigns the starting address of the same memory area of the array to the...