C sizeof a passed array [duplicate]
There is no magic solution. C is not a reflective language. Objects don’t automatically know what they are. But you have many choices: Obviously, add a parameter Wrap the call in a macro and automatically add a parameter Use a more complex object. Define a structure which contains the dynamic array and also the size … Read more