Just to add to Richard's solution, a couple of bits for you to think about.
1) The specification says that the name of an array is a pointer t the first element. SO when Richard does this:
unsigned char uchars[5] = { 17, 17, 17, 17, 17 };
thefunction(uchars);
he passed the name of the array into the function as a pointer to the first element. He could have written it as
unsigned char uchars[5] = { 17, 17, 17, 17, 17 };
thefunction(&(uchars[0]));
and explicitly pass the pointer, but it isn't needed.
2) You need to be careful when returning pointers from functions: if the array you return is not the same array in memory as is passed in - and it probably shouldn't be - then you have to be sure that you don't declare teh array directly inside your function as it will be created on the stack and the memory "recycled" when the array exits. This can cause some really nasty bugs, and is called a "hanging reference". To allocate heap memory - which you can return from your function, but which will need correct disposal to prevent "memory leaks" from your app - use either
malloc
or the
new
keyword.