Vidyalelo
Data Structure · Q102

Stacks in Data Structures

Programming · Data Structure · question 102

Q102

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
Answer
D.
pop operation is performed properly

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board