选择题 共15道
const int MAX_SIZE = 100; int stack[MAX_SIZE]; int top = -1; bool isEmpty() { return top == -1; } bool isFull() { return top == MAX_SIZE - 1; } void push(int value) { if (isFull()) { return; } stack[++top] = value; } void pop() { if (isEmpty()) { return; } cout << stack[top--]; }