C language problems.
That's what you mean. The number of elements is obtained by subtracting the pointer here.

Suppose base is int *base, and top is naturally int * top.

At first, base allocates memory, and then top = base. At this time, top-base=0, that is, the stack is empty.

If there is an element, top-base= 1.

Stacksize is an int number initialized to base, right?