Now that you're fiddling with pointers, what about using a pointer variable to fill your "new" array? Hint: The array designator is also a pointer to the first element of the array. That's the reason why the indirection operator (*) worked in your first attempt.

Unrelated side notes:
- The n parameter of your capitalize() function shadows the (unused) global n variable.
- One day you may come across the term Variable-length array - Wikipedia. The more you read about it the less you probably want to use VLAs.