D
DeepaK K C
Could anybody tell me how to pass array to a function by value?
-Deepak
-Deepak
DeepaK said:Could anybody tell me how to pass array to a function by value?
DeepaK K C said:Could anybody tell me how to pass array to a function by value?
DeepaK said:Could anybody tell me how to pass array to a function by value?
-Deepak
Three ways depending on how, why and where you want responsibilities to
be for this.
1. Put the array in a struct.
2. Create a copy of the array in the calling function.
3. Create a copy of the array in the called function.
DeepaK said:Could anybody tell me how to pass array to a function by value?
#include <stdlib.h>> cat main.c
a = 0.000000 1.000000 2.000000 3.000000> gcc -Wall -std=c99 -pedantic -o main main.c
> ./main
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.