Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Note the following: 1. All questions should be attempted by each individual student and copy/paste is strictly prohibited. Those who do not follow the instructions,
Note the following:
1. All questions should be attempted by each individual student and copy/paste is strictly prohibited. Those who do not follow the instructions, will be marked zero in their respective assignments.
2. As this is part of semester course assessments, it should be submitted through LMS only and within due date. Assignment submitted after the deadline will not be accepted nor graded.
3. Answer the questions in your own neat handwriting and scan it and submit it through LMS.
Q1. a. Explain why some programming languages require automatic memory management (garbage collection) for program execution?
b. At a given point in the execution of a program, what can be considered as garbage? How can garbage be located in memory?
Q2. Consider the following Context Free Grammar (CFG)
|
|
|
where {a, b, c, d, e} is the set of terminal symbols.
a. Give a right-most derivation of ecadeb.
b. Give a left-most derivation of ecadeb.
c. Compute FIRST and FOLLOW for this grammar?
d. Discuss whether CFG is ambiguous or not and draw the parsing tree?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started