In C / C ++, you cannot pass an entire array as an argument to a function. You can, however, pass functions to a pointer to an array by specifying the name of the array without an index.
(for example) This fragment of the program passes the address I to func1 ():
int main(void) { int i[10]; func1(i); . . . }
To get i, the function func1 () can be defined as
void func1(int x[]) { . . }
or
void func1(int *x) { . . }
or
void func1(int x[10]) { . . }
source: FULL LINK - HERBERT.
Muthu ganapathy nathan
source share