C dynamic array and pointers
If I were to call this function with an element created on the stack (example below), would it continue to work for the entirety of the program's lifetime?


No, it wouldn't:


i is created on the stack
pointer to i is saved in the list
i disappears and stack is reused when caller goes out of scope (now list is pointing to garbage)


Your List can be used to store:


Objects created on the heap (using malloc)
Global/static objects
Local stack objects, but only if they are removed again before they go out of scope.


For example:

List l;
List_Init(&amp;l);
int i = 1;
int* ptr_i = (int*)malloc(sizof(int));
*ptr_i = i;
List_Add(&amp;l, ptr_i);
// *ptr_i will remain until someone calls free(ptr_i)