Solved

Given the Following Stack Declaration, Which of the Following Function

Question 49

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents