#include int stk[ ]int top=- int pop()void push(int)int main(int valniarr[ ]clrscr()printf("\ enter the number of elements in the array ")scanf("% "& )printf("\ enter the elements of the array ")for( = ; < ; ++scanf("% "&arr[ ])for( = ; < ; ++push(arr[ ])for( = ; < ; ++val pop()arr[ivalprintf("\ the reversed array is ")for( = ; < ; ++printf("\ % "arr[ ])getche"()return void push(int valstk[++topvalint pop(return(stk[top--])output enter the number of elements in the array enter the elements of the array the reversed array is implementing parentheses checker stacks can be used to check the validity of parentheses in any algebraic expression for examplean algebraic expression is valid if for every open bracket there is corresponding closing bracket for examplethe expression ( +bis invalid but an expression { ( )is valid look at the program below which traverses an algebraic expression to check for its validity programming example write program to check nesting of parentheses using stack #include #include #include #define max int top - int stk[max]void push(char)