possiblen;

  1. nix

    whats wrong with this simple C stack program?

    /*stack program*/ #include<stdio.h> #include<conio.h> #include<stdlib.h> int s[10],top=-1,item,n=5; void push() { if (top==n-1) { printf("stack is full, so pushing not possible\n"); getch(); return; } printf("ener the item to be pushed\n"); scanf("%d",&item); top=top+1; s[top]=item; } void...
Top Bottom