1.

How Can You Pass An Array To A Function By Value?

Answer»

An ARRAY can be passed to a function by value, by keeping a PARAMETER with an array TAG with empty square brackets(like []). From the caller function, just pass the array tag. For instance,
VOID func(int i[]) {..} /* parameter */
...
int k[10];
func(k); /* caller function */

An array can be passed to a function by value, by keeping a parameter with an array tag with empty square brackets(like []). From the caller function, just pass the array tag. For instance,
void func(int i[]) {..} /* parameter */
...
int k[10];
func(k); /* caller function */



Discussion

No Comment Found