Examveda

Find the error (if any) in the following code snippet for pop operation.
void pop() //removing an element from a stack
{
     printf(“%s”, stack[top++]);
}

A. run time error

B. compile time error

C. pop operation is performed, but top moved in wrong direction

D. pop operation is performed properly

Answer: Option C


This Question Belongs to Data Structure >> Stacks In Data Structures

Join The Discussion

Related Questions on Stacks in Data Structures