Solved

Given the Following Stack Declaration, Which of the Following Function

Question 4

Multiple Choice

Given the following stack declaration, which of the following function definitions would correctly implement the destructor?
Struct StackFrame
{
Char data;
StackFrame *link;
};
Typedef StackFrame* StackFramePtr;
Class Stack
{
Public:
Stack ) ;
Stackconst Stack& a_stack) ;
~Stack ) ;
Void pushchar the_symbol) ;
Char pop ) ;
Bool empty ) const;
Private:
StackFramePtr top;
};


A) top=NULL;
B) char next;
While ! empty ) )
Next = pop ) ;//pop calls delete.
C) char next;
While!empty ) )
Next = push) ;
D) none of the above

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions