?
In the given C snippet, find the statement number that has error.
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++;
}
}
//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++;
}
}
Join the Discussion
Login to post a comment or share your explanation.
Login