What is the output of the following code?stackType stack;int x, y;x = 4;y = 2;stack.push(6);stack.push(x);stack.push(x + 1);y = stack.top();stack.pop();stack.push(x + y);x = stack.top();stack.pop();cout << "x = " << x << endl;
A. x = 4
B. x = 5
C. x = 6
D. x = 9
Answer: D
Computer Science & Information Technology
You might also like to view...
The deq.front() operation on a deque object checks whether the container is empty.
Answer the following statement true (T) or false (F)
Computer Science & Information Technology
A(n) ____________________ agency provides specifically qualified individuals at the paid request of another company.
Fill in the blank(s) with the appropriate word(s).
Computer Science & Information Technology