Examveda

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++;
    }   
 }

A. 1

B. 9

C. 10

D. 11

Answer: Option C


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

Join The Discussion

Related Questions on Stacks in Data Structures