#include void main(){ char stack[20],ip[20],opt[10][10][1],ter[10]; int i,j,k,n,top=0,col,row; for(i=0;i<10;i++) { stack[i]=NULL; ip[i]=NULL; for(j=0;j<10;j++) { opt[i][j][1]=NULL; } } printf("Enter the no.of terminals :\n"); scanf("%d",&n); printf("\nEnter the terminals :\n"); scanf("%s",&ter); printf("\nEnter the table values :\n"); for(i=0;i') { while(stack[top]!='<'){--top;} top=top-1; printf("Reduce"); } else { printf("\nString is not accepted"); break; } } printf("\n"); for(k=0;k<=top;k++) { printf("%c",stack[k]); } printf("\t\t\t"); for(k=i;k