UGC NET Paper 2 (Computer Science)Hard

For the grammar E -> TE', E' -> +TE' | e, T -> FT', T' -> *FT' | e, F -> (E) | id, FOLLOW(T) is:

  1. A. {+, *, ), $}
  2. B. {*, ), $}
  3. C. {+, $}
  4. D. {+, ), $}

Correct answer: D. {+, ), $}

T is followed by FIRST(E') = + or, since E' can vanish, by FOLLOW(E) = { ), $ }; * only follows F.

More UGC NET Computer Science and Applications questions

Exams that ask this topic