Examlex

Solved

What Is the Output of the Following Code

question 9

Multiple Choice

What is the output of the following code?
stackType<int> 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;


Definitions:

Related Questions