HamroCSIT Logo
HAMRO CSIT
  • Course New
  • Entrance
    • Entrance Preparation
    • 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
Subject

Compiler Design and Construction

This course is designed to develop acquaintance with fundamental concepts of compiler design. The course starts with the basic concepts and also includes different phases of compilers like lexical analysis, syntax analysis, syntax-directed translation, type checking etc. in detail.

Subject Image | Hamro CSIT
  • Chapters
  • Syllabus
  • Question Banks
  • Questions
  • Text Book
  • Practical
  • Viva

Exam Year

  • CDC Model Set II
  • CDC Model Set I
  • CDC Question Bank 2081(new)
  • CDC Question Bank 2081
  • CDC Question Bank 2075
  • CDC Question Bank 2080
  • CDC Question Bank 2076
  • CDC Question Bank 2078

Tribhuvan University

Institute of Science and Technology

2080

Bachelor Level / sixth-semester / Science

Computer Science and Information Technology( CSC365 )

Compiler Design and Construction

Full Marks: 60 + 20 + 20

Pass Marks: 24 + 8 + 8

Time: 3 Hours

Candidates are required to give their answers in their own words as far as practicable.

The figures in the margin indicate full marks.

Section A

Attempt any two questions.

1

Differentiate between one-pass and multi-pass compiler. Construct the LL(1) parsing table for the following grammar.

S → ABCD

A → a | ε

B → b

C → 0 | ε

D → d | ε

2

How does Lexical Analyzer recognize a token? Give an example to make it clear. Convert the regular expression a(a+b)(b+c)*a# to DFA.

3

Construct the LR(1) parsing table for the following grammar.

S → AaAb

A → BbBa

A → ε

B → ε

Section B

Attempt any eight questions.

4

Why code optimization is needed? Describe any two techniques for loop optimization.

5

What is three-address code? How high level code is converted to three address code? Illustrate with an example.

6

What is activation tree? Define type checking system with examples.

7

What are the advantages of intermediate code? What types of information are provided by symbol table?

8

What is annotated parse tree? Define S-attributed grammar with an example.

9

Describe about syntax directed translation with an example.

10

Given the following grammar with SLR parsing table, test whether the string “int * (int + int)” will be accepted or rejected.

E -> T + E……….(1)

E -> T……….(2)

T -> int*T……….(3)

T -> int……….(4)

T -> (E)……….(5)

STATE ACTION GOTO
int * + ( ) $ E T
1 S5 S4 2 3
2 ACC
3 S6 R2 R2
4 S5 S4 7 3
5 S8 R4 R4 R4
6 S5 S4 9 3
7 S10
8 S5 S4 11
9 R1 R1
10 R5 R5 R5
11 R3 R3 R3
11

How do you recognize basic block? Discuss about the factors that affect code generator.

12

Find the FIRST and FOLLOW of all the non terminals in following grammar.

S → aAbCD | ε

A → SD | ε

C → Sa

D → aBD | ε

Compiler Design and Construction Question Bank Solution 2080
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
20230698
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