1.

According to the precedence rules, x-y-z is equivalent to which of the following?(a) (x-y)-z(b) x-(y-z)(c) Both (x-y)-z and x-(y-z)(d) None of the mentionedThis question was addressed to me in an internship interview.My query is from Building Regular Expressions in portion Regular Expressions and Languages of Automata Theory

Answer»

The correct choice is (a) (x-y)-Z

The best I can explain: In ARITHMETIC, we GROUP two of the same operators from the left, HENCE x-y-z is EQUIVALENT to (x-y)-z and not x-(y—z).



Discussion

No Comment Found

Related InterviewSolutions