step scan each character in the infix expression for thisrepeat steps - until the end of infix expression step push the operator into the operator stackoperand into the operand stackand ignore all the left parentheses until right parenthesis is encountered step pop operand from operand stack step pop operand from operand stack step pop operator from operator stack step concatenate operator and operand step concatenate result with operand step push result into the operand stack step end figure algorithm to convert an infix expression into prefix expression step reverse the infix string note that while reversing the string you must interchange left and right parentheses step obtain the postfix expression of the infix expression obtained in step step reverse the postfix expression to get the prefix expression figure algorithm to convert an infix expression into prefix expression the corresponding prefix expression is obtained in the operand stack for examplegiven an infix expression ( ( lstep reverse the infix string note that while reversing the string you must interchange left and right parentheses ( ( astep obtain the corresponding postfix expression of the infix expression obtained as result of step the expression is( ( atherefore[ ( /)[( / [lka/-[cb/ - step reverse the postfix expression to get the prefix expression thereforethe prefix expression is / programming exam write program to convert an infix expression to prefix expression #include #include #include #include #define max char st[max]int top=- void reverse(char str[])void push(char st[]char)char pop(char st[])void infixtopostfix(char source[]char target[])int getpriority(char)char infix[ ]postfix[ ]temp[ ]int main(clrscr()printf("\\ enter any infix expression ")gets(infix)reverse(infix)strcpy(postfix"")infixtopostfix(temppostfix)printf("\ the corresponding postfix expression is ")puts(postfix)strcpy(temp,"")reverse(postfix)