ExamVeda
Login
Home
Stacks in Data Structures
?

In the given C snippet, find the statement number that has error.
//C code to push an element into a stack
void push( struct stack *s, int x) 
{
    if(s->top==MAX-1)
    {
        printf(“stack overflow”);
    }
    else
    {
        s->items[++s->top]=x;
        s++;
    }   
 }

Answer & Solution
Correct Answer: Option C
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.