in Compiler Design edited by
329 views
0 votes
0 votes

in Compiler Design edited by
329 views

3 Comments

Answer is Option C.

Here, A1.evenx is checking whether number of x's are even or odd in A1.

But A has 1 more x than A1. Because A = xA1y(Hence one x is appended). (A.n or A1.n => counting number of x's)

Hence option B = A.n = A1.n + 1

And by taking mod it checks whether they are even or odd.

Now Option A is ofcourse true because A has 1 more x than A1. Hence if A1 calculates x's as even definitely A has +1 (hence even changes to odd and viceversa)

0
0
I think the answer is C too but the correct answer provided by ACE's faculty is only A.
0
0

yes Answer is C, ACE has given wrong answer.

https://gateoverflow.in/172276/compiler-design-test-series-question

0
0

Please log in or register to answer this question.

Related questions