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
Draw and explain the complete structure of an activation record with all components (return value, actual parameters, control link, access link, saved machine status, local data, temporaries).

Show the activation tree and activation record contents for the following code at the point when factorial(1) is executing:

int factorial(int n) {

    if (n <= 1)

        return 1;

    return n * factorial(n-1);

}

int main() {

    int x = factorial(3);

}

Not Answered Compiler Design and Construction
HamroCSIT User
What is a symbol table? Compare different data structures for implementing symbol table:

  • Linear list
  • Hash table
  • Binary search tree

Which is most efficient and why?

Show hash table implementation for storing the following identifiers using hash function h(x) = (sum of ASCII values) mod 7:

Identifiers: {sum, count, avg, total, temp}

Use chaining for collision resolution.

Not Answered Compiler Design and Construction
HamroCSIT User
Construct the operator-precedence relations (⋖, ≐, ⋗) for the following grammar:

E → E + T | T

T → T * F | F

F → (E) | idBuild the complete operator-precedence table. Parse the string id + id * id using this table showing all stack operations.

Not Answered Compiler Design and Construction
HamroCSIT User
What are closure and goto operations in LR parsing? Compute the closure of the following LR(0) item set:

I₀ = {[S’ → •S, $]}

Grammar:

S → AB

A → aA | b

B → c

Then compute GOTO(I₀, a) showing all steps.

Not Answered Compiler Design and Construction
HamroCSIT User
What is a macro? Differentiate between macro and procedure. Explain macro expansion with example.

Show the complete macro expansion for:

#define SQUARE(x) ((x) * (x))

#define MAX(a, b) ((a) > (b) ? (a) : (b))

#define CUBE(x) (SQUARE(x) * (x))

result = MAX(SQUARE(3), CUBE(2));

Not Answered Compiler Design and Construction
HamroCSIT User
Draw the detailed block diagram of a compiler showing all phases with inputs and outputs of each phase. Explain how symbol table and error handler interact with different phases of compilation.
Not Answered Compiler Design and Construction
HamroCSIT User
What is L-attributed definition? Differentiate between S-attributed and L-attributed definitions with examples.

Write an L-attributed syntax-directed definition for the following grammar that builds a syntax tree:

E → E₁ + T    

E → T

T → T₁ * F    

T → F

F → (E)       

F → id

Draw the annotated parse tree showing all attribute values for the input: id₁ + id₂ * id₃

Not Answered Compiler Design and Construction
HamroCSIT User
What is the difference between LR(0), SLR(1), and LR(1) parsing? Explain with examples when each would fail or succeed.

Compute the LR(1) items and construct the LR(1) parsing table for:

S’ → S

S → AA

A → aA | b

Show the parsing actions for the input string “aab”.

Not Answered Compiler Design and Construction
HamroCSIT User
Write short notes on:

a) Error recovery in parsing (panic mode, phrase-level recovery)
b) Parameter passing mechanisms (call by value, call by reference, call by name)

Not Answered Compiler Design and Construction
HamroCSIT User
What is register allocation? Explain register allocation using graph coloring algorithm. Given the following live ranges, perform register allocation with 3 registers available:

Variables: a, b, c, d, e

 

Live ranges overlap:

– a and b overlap

– b and c overlap  

– c and d overlap

– d and e overlap

– a and c don’t overlap

– b and e overlap

 

Draw the interference graph and assign registers.

Not Answered Compiler Design and Construction
Page navigation
  • «
  • « First
  • Page 23
  • Page 24
  • Current Page 25
  • Page 26
  • Page 27
  • 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
20074670
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