Stack implementation using array but in switch case there is error

while(1)
{
printf("Select and enter your choice:\n");
printf("(1)PUSH\n");
printf("(2)POP\n");
printf("(3)Display\n");
scanf("%d",&ch);
switch(ch)
{
case 1:
printf("Enter the element:");
scanf("%d",&x);
push(stack,x);
break;
case 2:
pop(stack);
break;
case 3:
display(stack);
break;
case 4:
return 0;
}
}
Please use code tags and format your code
Topic archived. No new replies allowed.