Line 17, change new_size to a->size. You need to copy the old number of elements, not the new one. In particular, when the array is new, the size is zero and you need to copy NO elements.
Remove line 49. i is unused.
Although your code will work with these changes, it's inefficient because it resizes the array every time you add a new element. A more efficient way to do this is to allocate space for extra elements each time. Then you have to keep track of both now many elements are used (the size) and how much room is available for new elements (the capacity).
Adding this stuff might be beyond the purpose of your assignment though.
Also, your code C, not C++. If you're meant to do this in C++ then it would be better to do it as a class.