A size of a pointer is always a constant value depending on your system. As you have been already told in another thread, you can't find out the size of an array if you just have a pointer to one...
Type: Posts; User: AndiPersti
A size of a pointer is always a constant value depending on your system. As you have been already told in another thread, you can't find out the size of an array if you just have a pointer to one...
So you want to find the start and the end of the subarray. One solution would be to return a struct containing both pointers.
How is the end point defined? Shouldn't this be another function?
...
You can't use the &-operator on the left side of an assignment.
I'm not sure what you want to achieve with this code.
As I undestand it the first part of your problem was to find the pointer to...
You know the end (last element) of your array, don't you?
Thus
array <= ptr <= &array[index_last_element]
// or
&array[0] <= &ptr[i] <= &array[index_last_element]
should always be true,...