Question: You need to manage a dynamically resizable stack within a structure. Define a `Stack` structure that contains a pointer to a dynamically allocated array of integers and an integer for tracking the current size. Implement the following in C:
→ A function to initialize the stack with a specific capacity.
→ A function to push a value onto the stack, doubling the capacity if the stack is full.
→ A function to pop a value from the stack.
→ A function to print all elements in the stack.
→ Ensure that memory is efficiently managed, avoiding memory leaks or excessive allocations.