template<class Type> void linkedStackType<Type>::linkedOperation1( ) { nodeType<
ID: 3615702 • Letter: T
Question
template<class Type>void linkedStackType<Type>::linkedOperation1( )
{
nodeType<Type>*temp;
if(stackTop!=NULL)
{
temp=stackTop;
stackTop=stackTop->link;
delete temp;
}
else
cerr<<"ERROR"<<endl;
}
A) Which stack operation is defined by linkedOperation1 above?
a. push
b.pop
c. top
d. copy
B) What does it mean if stackTop equals NULL in the operationabove?
a. The stack is full
b. The stack is empty
c. The element does not exist
d. The stack is nonempty but not full
Explanation / Answer
Dear...
For the given code
A) linkedOperation1 is pop operation in the stack
B) To check whether the stack is empty.
Hope this will help you..
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.