I have a function that takes in pointers to different arrays which can look like this:
unsigned char *arr[] = {0x34, 0x10, 0x3f, 0x00, 0x00 }
I want to know how many elements (bytes) are in each array my function is getting. For example, I need a way to find that this array has 5 bytes. I pass this into a function to print the values of the array. Sizeof(arr) doesn’t give me the right results.
This is C. and in C this does not exist. You have to somewhere remember /store the number of elements.