MindStudy, question and answer site designed to help students, to help each other:
To ask, to learn, to share, to grow.
Get the right answers. Fast
Submit answers for community.
Pat yourself on the back. You deserve it.
524 questions
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.
Generate the three address code for the following code segment.
main() { int a=1, z=0; int b[10]; while (a<=10) b[a]=2*a; z=b[a]+a; }
Three address code for the above code segment: I0 func begin main
Explain left factoring with suitable example.
Left factoring is removing the common left factor that appears in two productions of the same non-terminal.
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.
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.
What is Basic Block? List out the basic blocks and draw the flow graph for the following code:
1. |
location= -1 |
2. |
i=0 |
3. |
i<100 goto 5 |
4. |
goto 13 |
5. |
t1=4*i |
6. |
t2=A[t1] |
7. |
if t2=x goto 9 |
8. |
goto 10 |
9. |
location=i |
10. |
t3=i+1 |
11. |
i=t3 |
12. |
goto 3 |
13. |
… |
Basic Block: The idea of basic block is very useful in implementing the optimizing transformations on the intermediate code.
Copyright © 2025 MindStudy
A product by Shunya Intelliware Solution
(Registered under MSME Uddyam)