All Questions

510 questions and answers

1035 views

What are the difference between linear and non-linear data structure?

Main difference between linear and non-linear data structures lie in the way they organize data elements.

Demo Teacher
added 2 years ago
1001 views

Explain left factoring with suitable example.

Left factoring is removing the common left factor that appears in two productions of the same non-terminal.

Demo Teacher
added 2 years ago
2564 views

Compare quadruples, triples and indirect triples.

x= (a + b) * - c / d

Represent this expression in quadruples, triples and indirect triples forms. Generate the machine code for the following instruction:

V=a+(b*c)-d.

The three address code can be using following methods: Quadruple: the quadruple is a structure with at most 4 fields such as OP, arg1, arg2, and result.

Demo Teacher
added 2 years ago
1101 views

Explain different stages of compiler with a suitable example. What is token, Patterns and Lexeme?

Compiler operates in phases. • Each phase transforms the source program from one representation to another.

Demo Teacher
added 2 years ago
1071 views

What do you mean by a Handle? Give example. When a grammar is called ambiguous? Is there any technique to remove ambiguity? Explain with an example. What is the reduce-reduce conflict in LR parser? What are various data structures used for symbol table construction?

A handle of a string is a substring that matches the right side of a production, and whose reduction to the non-terminal on the left side of the production represents one step along the reverse of a rightmost derivation.

Demo Teacher
added 2 years ago