HamroCSIT Logo
HAMRO CSIT
  • Course New
  • Entrance
    • Take Free Test
    • MCQ Questions
    • Colleges
    • Entrance Class
    • Entrance Books
    • Free Entrance Video Course
  • Semester
    • First Semester
    • Second Semester
    • Third Semester
    • Fourth Semester
    • Fifth Semester
    • Sixth Semester
    • Seventh Semester
    • Eight Semester
  • Questions
  • Subscription Automated
  • Notices
  • Articles
  • More
    • Ask Question
    • College Ambassadors
    • Financial Support Program
    • Contribute
    • Contact Us
Login Register
Hamro CSIT User Account
  • Sign In
  • Create Account




Shape | Hamro CSIT Shape | Hamro CSIT Shape | Hamro CSIT Shape | Hamro CSIT

Questions

  • Ask Any Question From TU CSIT Syllabus?
Search
Semester
Subject
Answer
Order
HamroCSIT User
Explain the following code optimization techniques with examples:

  1. a) Copy propagation
    b) Constant folding
    c) Dead code elimination
    d) Strength reduction

Apply all applicable optimizations to:

x = 3;

y = x;

z = x + 5;

a = y * 2;

b = 8;

c = b / 2;

d = a + 0;

Not Answered Compiler Design and Construction
HamroCSIT User
Write syntax-directed definitions for translating boolean expressions into three-address code using backpatching. Generate code for:

if (a < b && c > d || e == f) 

    x = 1;

else

    x = 0;

Not Answered Compiler Design and Construction
HamroCSIT User
What is intermediate code? Explain the advantages of three-address code. Generate three-address code, quadruples, triples, and indirect triples for:

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

Not Answered Compiler Design and Construction
HamroCSIT User
What are handles in LR parsing? Explain handle pruning with example. For the grammar:

E → E + T | T

T → T * F | F

F → (E) | id

Show the handle at each step for reducing the string: id + id * id

Not Answered Compiler Design and Construction
HamroCSIT User
Compute FIRST and FOLLOW for all non-terminals in the grammar:

S → ACB | CbB | Ba

A → da | BC

B → g | ε

C → h | ε

Construct the LL(1) parsing table. Is this grammar LL(1)? Justify your answer.

Not Answered Compiler Design and Construction
HamroCSIT User
Given the following DFA with states {A, B, C, D, E, F}, minimize it using state minimization algorithm:

Start state: A

Final states: {D, F}

Transitions:

δ(A, 0) = B,  δ(A, 1) = C

δ(B, 0) = D,  δ(B, 1) = E

δ(C, 0) = E,  δ(C, 1) = D

δ(D, 0) = D,  δ(D, 1) = D

δ(E, 0) = F,  δ(E, 1) = F

δ(F, 0) = F,  δ(F, 1) = F

Show all steps clearly including partition refinement.

Not Answered Compiler Design and Construction
HamroCSIT User
What is recursive descent parsing? Write a recursive descent parser for the following grammar:

S → aS | bA

A → bA | c

Show how it parses the string “aabc”.

Not Answered Compiler Design and Construction
HamroCSIT User
Convert the following regular expression to NFA using Thompson’s construction:

(a|b)*a(a|b)

Then convert this NFA to DFA using subset construction method. Finally, minimize the DFA using state minimization algorithm.

Not Answered Compiler Design and Construction
HamroCSIT User
What is backpatching? Why is it used in code generation? Generate three-address code with backpatching for the following code:

while (a < b) {

    if (c < d) 

        x = y + z;

    else

        x = y – z;

}

Also show the quadruples and explain how backpatch function works.

Not Answered Compiler Design and Construction
HamroCSIT User
What is ambiguous grammar? Explain the “Dangling Else” problem with example. Show how to resolve it.

Construct the LL(1) parsing table for the following grammar (after removing left recursion if needed):

E → E + T | T

T → T * F | F  

F → (E) | id

Parse the string id + id * id using this table.

Not Answered Compiler Design and Construction Asked on 2082 Exam
Page navigation
  • «
  • « First
  • Page 24
  • Page 25
  • Current Page 26
  • Page 27
  • Page 28
  • Last »
  • »
Question's Answer
Solution Video
Solution
Share

Share this link via

Or copy link

logoHAMROCSIT

Hamro CSIT is a comprehensive web and mobile platform that provides B.Sc. CSIT students with resources like notes, syllabi, question banks, solved past papers, practical files, and free entrance preparation materials — all in one place.

  • [email protected]
Semester
  • First Semester
  • Second Semester
  • Third Semester
  • Fourth Semester
  • Fifth Semester
  • Sixth Semester
  • Seventh Semester
  • Eighth Semester
Links
  • About Us
  • FAQs
  • Sitemap
  • Privacy Policy
  • Terms and Conditions
  • College Ambassadors
  • Financial Support Program
Hits Counter
20074754
Google Play App Store
Follow Us

Copyright 2026 | HAMROCSIT | All Right Reserved

Official Payment Partner Esewa Logo
HAMROCSIT.COM

Copyright 2024 | HAMROCSIT.COM | All Right Reserved - Nymna Technology