Home Forums C Programming Getting the length of an array Reply To: Getting the length of an array

Thank you. I also can’t imagine how it works. I thought about strings and the function strlen…
Somehow the program allocates memory and may not write anything else into this memory. The program also has to know the size of the array, when it wants to free the memory again. The information is somewhere. Maybe there is also a kind of end tag at the end of the allocated memory. But that is for sure a very sophisticated matter.