+ 8

Evaluate the following postfix notation of expression : False,true,not,or,true, false,and,or.

23rd Feb 2018, 5:52 AM
Prachi Chauhan
Prachi Chauhan - avatar
8 Respuestas
+ 9
(show status of stack after each operation) The answer is FALSE but i need to know how? this question is from my Cs book.
23rd Feb 2018, 6:42 AM
Prachi Chauhan
Prachi Chauhan - avatar
+ 8
Ok, thanks.
23rd Feb 2018, 8:35 AM
Prachi Chauhan
Prachi Chauhan - avatar
+ 2
:D
23rd Feb 2018, 7:51 AM
Farshaad Heydari
Farshaad Heydari - avatar
+ 1
can u write it in code. I don't get it.....:)
23rd Feb 2018, 5:58 AM
Farshaad Heydari
Farshaad Heydari - avatar
+ 1
F, push, F T, push, T !, pop T !T is push F, FF || , pop 2 F or F = F push F, F T, push, FT F, push F, FTF &&, pop2 T&F=F push F,FF || pop2 F or F = F push F, F Uh I think but having a huge brain fart on this lol.
23rd Feb 2018, 7:41 AM
emmey
emmey - avatar
+ 1
you always push onto the stack or pop off. the logical operators use whats on the stack to get your next value. lifo last in first out. so take your values and run the logic operators through them. && || always require 2 args so pop last 2 and eval.
23rd Feb 2018, 8:24 AM
emmey
emmey - avatar
+ 1
False true not (= false) or (false or false= false) true false and (true and false= false) or (false or false= false)
14th Feb 2019, 1:55 AM
Cristian Baeza Jimenez
Cristian Baeza Jimenez - avatar
0
Evaluate the following postfix expression. False , True, NOT,OR, True, False, AND,OR
4th Aug 2020, 2:20 PM
Sindura Doddaka
Sindura Doddaka - avatar