Professional Documents
Culture Documents
View Answer
Ans : C
A. Type mismatch
B. Undeclared variable
C. Reserved identifier misuse.
D. All of the above
View Answer
Ans : D
Explanation: We have mentioned some of the semantics errors that the semantic analyzer is
expected to recognize: Type mismatch, Undeclared variable, Reserved identifier misuse,
Multiple declaration of variable in a scope, Accessing an out of scope variable, Actual and
formal parameter mismatch.
A. Domain grammer
B. Attribute grammar
C. Object grammer
D. Value grammer
View Answer
Ans : B
A. Analyzer attribute
B. Attributed AST
C. Analyzer AST
D. AST
View Answer
Ans : B
Explanation: Semantic analyzer attaches attribute information with AST, which are called
Attributed AST.
5. Which attributes get values from the attribute values of their child nodes?
A. Synthesized attributes
B. Inherited attributes
C. S-attributed SDT
D. L-attributed SDT
View Answer
Ans : A
Explanation: Synthesized attributes : These attributes get values from the attribute values of
their child nodes.
6. Which form of SDT uses both synthesized and inherited attributes with restriction of not
taking values from right siblings?
A. T-attributed SDT
B. A-attributed SDT
C. S-attributed SDT
D. L-attributed SDT
View Answer
Ans : D
Explanation: L-attributed SDT : This form of SDT uses both synthesized and inherited
attributes with restriction of not taking values from right siblings.
7. If an SDT uses only synthesized attributes, it is called as?
A. T-attributed SDT
B. A-attributed SDT
C. S-attributed SDT
D. R-attributed SDT
View Answer
A. Scope resolution
B. Type checking
C. Array-bound checking
D. All of the above
View Answer
Ans : D
Explanation: The following tasks should be performed in semantic analysis: Scope resolution,
Type checking, Array-bound checking.
View Answer
Ans : A
Ans : D