I'm writing a whole set of functions that needs to edit a huge data structure, and I'm getting a little confused over exactly how some things work:
1) I know things like arrays are passed to functions as pointers, does a struct work the same way? eg if I pass a struct to a function & edit it, do those changes remain after the function terminates?
2)if I want to be able to edit a pointer to a struct (eg free & malloc it to somewhere else) inside a function, then by my understanding I have to pass the function a pointer to a pointer to a struct. this leads to the clunky syntax:
is there any way to reduce the number of pointers to pointers involved here?