Operator Precedence Parse Program in C- Program- #include<stdio.h> #include<conio.h> void main() { char stack[20], ip[20], opt[10][10][1], ter[10]; int i, j, k, n, top = 0, col, row; clrscr(); 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 < n; i++) { for (j = 0; j < n; j++) { printf("Enter the value for %c %c:", ter[i], ter[j]); scanf("%s", opt[i][j]); } } printf("\n**** OPERATOR PRECEDENCE TABLE ****\n"); for (i = 0; i < n; i++) { printf("\t%c", ter[i]); } ...
competitive programming guides eg.algorithms,problems,tricks ,datastructure based on cp.