Prev Year Qs

You might also like

Download as pdf
Download as pdf
You are on page 1of 9
Total No. of Pages : 01 VU Semester PAPER CODE TITLE OF PAPER - COMPILER DESIGN Time: 01 HR. 30 Min Max. Marks: 25 ER EXAMINATION B.Tech. SEPTEMBER-2018 Note : All questions are compulsary and carry equal marks. Write legibly; avoid over-writing and unnecessary cutting. Assume suitable missing data, if any. 1. Discuss detailed structure or various phases of compiler. Illustrate the idea (5) using the assignment statement position = initial + rate « 60. 2. Draw a NFA for regular expression (a + 8)*abb. Then, convert the resulting (5) NFA into, an equivalent DFA. 3. Consider. the context-free grammar : SSS +|SS * |aand the string (5) aa +a* (a) Give a leftmost derivation for the string. (b) Give a rightmost derivation for the string (c) Give a parse tree for the string, | (d) Is the grammar ambiguous or unambiguous 2 Justify your answer, (e) Describe the language generated by this grammar. (5) (5) 4, What is parsing? Explain various parsing techniques. 5. Find FIRST and FOLLOW for the following grammar: i. BO EST|T, ToTeF|F, P(E) \i¢ x xx ) wv , —I5I- Total no. of pages :1 ——!!__Semester Roll No., B.Tech (EE) Sep-2018 (a) Cr i (a) Teate a function to convert Cartesian coordinates to polar form and viceversa and show with example(s).. (®) A radioactive element decays ata constant decay rate of 0.001 per year and it is found that after 100 years only S00g of element remains. Show how using matlab intial amount of element can be computed. (c) Plot the function F= x2 if -1exe0.7 and .49 if 0.7 micuUL, yielded the following results: Retum period T (years) Peak flood (m/sec) F—-1O5- 50 30,810 100 36,300 Estimate the flood magnitude in this river with a return period of 500 years. @) A drainage basin has 160 km? area, 7 hours time of concentration and 9 hours as storage constant with the following information about inter- isochrone area distribution, determine 1 hour unit hydrograph upto its peak value. (3) Time (h) 0-1 1-2 2-3 3-4 4-5 5-6 6-7 Inter isochrones 103] 36) 22, 437-35, 107 2 Area (km?) The IUH of a catchment is triangular in shape with a base of 42 hours and a peak of 20m?/sec at 7 hours from the start. Estimate the flood hydrograph if Scm effective rainfall occurs in 2 hours. Design a 140m long bench terrace for a land having an average slope of 18%. The soil is clay loam.the terrace channel has uniform grade 0.5%. Maximum intensity rainfall expected during the 10 years recurrence interval 10 cm//hr. The values of K, x, a and n may be taken @) as 6.0, 0.22, 0.5 and 0.8 resectively. Give brief notes on following asects of gully control: Planning gully _. control, vegetation and gully control structures. = @)

You might also like