1.

The most suitable data structure used to represent the derivations in compiler:(a) Queue(b) Linked List(c) Tree(d) Hash TablesI had been asked this question in final exam.The doubt is from Construction and Yield of a Parse Tree topic in portion Context Free Grammars and Languages of Automata Theory

Answer»

Correct choice is (c) TREE

To elaborate: The tree, known as “PARSE tree” when used in a compiler, is the data structure of choice to REPRESENT the source PROGRAM.



Discussion

No Comment Found

Related InterviewSolutions