Program for stack.

#include stdio.h
#include conio.h
#include process.h
int a[10],i;
void main()
{
int ch,top=-1,n;
clrscr();
printf("Enter the Stack size:");
scanf("%d",&n);
printf("Enter the elements of the Stack");
for(i=0;i-1;i--)
{
printf("Element %d : %d\n",i,a[i]);
}
break;
case 4: exit(0);
break;
default:
printf("Wrong Entry");
}
}
getch();
}

No comments:

Post a Comment