I got to solve this program, but I don't really know how to use a Stack using a pointer. If there's anyone that could explain that to me, I would be grateful.
Implement a.t.p. Stack using a pointer and write a subroutine that calculates the value of a logical expression given in prefix form. You need to solve the problem using the stack. Input: a string that represents a logical expression in prefix form Output: the value of the loaded expression For example, the input data:
|0&1|^010
should write:
1
Note: & = AND, | = OR, ^ = XOR, - = NOT
(P.S. Excuse me if there's any mistake, english is not my mother tongue)
This question should be of help to you - How to evaluate arithmetic expression using stack c?.