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++]);
}
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
Join The Discussion