In C: How do you find the number of elements in an array of structs, after sending it to a function?
int main(void) { myStruct array[] = { struct1, struct2
In the code above, function f() has no way of knowing how many elements were in your original array. It's a feature of the language and there's no way around it. You'll have to pass the length.