Is there a way to get the length of an Array when I only know a pointer pointing to the Array?
See the following example
int testInt[3]; testInt[0] =
You can if you point the the whole array and NOT point to the first element like:
int testInt[3]; int (*point)[3]; point = testInt; printf( "number elements: %lu", (unsigned long)(sizeof*point/sizeof**point) ); printf( "whole array size: %lu", (unsigned long)(sizeof*point) );