Professional Documents
Culture Documents
CD Assignment3 2023-24
CD Assignment3 2023-24
Q. Questio
No. ns
1 Determine the three-address code for the following C code:
switch (c)
{ case 1: z = z+a*b; break;
case 2: z = z-a*b; break; }
2 Determine the quadruples, triples, and indirect triples for the following
expression: (x+y) * (y+z) + (x+y+z)
3 Illustrate the role of syntax directed translation in compiler design. Also explain
how semantic actions are attached to the production with example.
4 Investigate the process of activation record creation for the following code:
main ( )
{ int fact; fact=factorial (3); }
int factorial (int n)
{ if (n ==1) return 1;
else return (n*factorial(n-1)); }
5 Illustrate the syntax directed definition (SDD) with suitable and simple example.
6 Explore the various data structures used for the symbol table construction.
7 Explain the various types of compile-time errors in phases of compiler.
8 Explain the run-time storage allocation strategies with their merits and limitations.
9 Explain the followings in terms of syntax directed translation:
(a) Effect of the statements that alter the flow of control
(b) Role of array references in arithmetic expression
10 Write the short note of Activation Record with their fields.