3 ms·
It avoids stepping on memory elsewhere in the program though. My personal preference for C99 and above is to pass the length as a parameter. int do_stuff(
by uxcn 11y ago
It avoids stepping on memory elsewhere in the program though. My personal preference for C99 and above is to pass the length as a parameter.
int do_stuff(size_t len, int64_t arr[len]);
It still suffers from the pointer decay problem, but it at least forces whoever is reading/writing the code to acknowledge the length.