NVIDIA Interview Question
Software Engineer / DevelopersSyntax-wise, strictly speaking you cannot pass an array by value in C.
void func (int* x); /* this is a pointer */
void func (int x[]); /* this is a pointer */
void func (int x[10]); /* this is a pointer */
by using stracture we can do it...
eg:
struct A { int arr[2]; };
void func(struct A);
Wrap it in a struct.
- mg August 08, 2009