100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4,6 TrustPilot
logo-home
Exam (elaborations)

cmsc 331 final review quizzes 1-6 with correct answers.

Rating
-
Sold
-
Pages
16
Grade
A+
Uploaded on
13-01-2026
Written in
2025/2026

cmsc 331 final review quizzes 1-6 with correct answers.

Institution
CMSC
Course
CMSC










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
CMSC
Course
CMSC

Document information

Uploaded on
January 13, 2026
Number of pages
16
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

cmsc 331 final review quizzes 1-6 with
correct answers

T/F: In a parse tree, the operator with the lowest precedence must appear at the
| | | | | | | | | | | | | | |


lowest level of the tree. - CORRECT ANSWER✔✔-false
| | | | | | |




T/F: A BNF grammar is a generative mechanism. - CORRECT ANSWER✔✔-true
| | | | | | | | | |




T/F: The string 0b_0011_1111_0100_1110 belongs to the language specified by
| | | | | | | | | |


the following context-free grammar.
| | |




bininteger = "0" ("b" | "B") ["_"] bindigit { ["_"] bindigit }
| | | | | | | | | | |




bindigit = "0" | "1" - CORRECT ANSWER✔✔-true
| | | | | | |




T/F: The syntax analyzer verifies whether the tokens in a program are correct. -
| | | | | | | | | | | | | |


CORRECT ANSWER✔✔-false |




lexical analyzer verifies whether tokens in a program are correct. the syntax
| | | | | | | | | | | |


analyzer verifies whether the program follows the correct grammar
| | | | | | | |




T/F: A grammar rule with both left recursion and right recursion always generates
| | | | | | | | | | | | |


the same parse tree. - CORRECT ANSWER✔✔-false
| | | | | |

,T/F: The Python and C++ languages implement the same associativity for
| | | | | | | | | | |


arithmetic operators. - CORRECT ANSWER✔✔-true
| | | |




T/F: A context-free grammar is a recognizer mechanism. - CORRECT ANSWER✔✔-
| | | | | | | | | |


true


T/F: BNF notation uses curly brackets, i.e. "{" and "}" symbols, to indicate zero or
| | | | | | | | | | | | | | |


more repetition of a symbol. - CORRECT ANSWER✔✔-false
| | | | | | |




EBNF uses "{" and "}" symbols, to indicate zero or more repetition of a symbol
| | | | | | | | | | | | | |




T/F: EBNF notation allows for a more concise grammar compared to an equivalent
| | | | | | | | | | | |


grammar in BNF notation. - CORRECT ANSWER✔✔-true
| | | | | | |




T/F: A rule with both left recursion and right recursion makes the grammar
| | | | | | | | | | | | |


ambiguous. - CORRECT ANSWER✔✔-true
| | |




T/F: In a BNF grammar a terminal symbol can be replaced by other symbols. -
| | | | | | | | | | | | | | |


CORRECT ANSWER✔✔-false |




T/F: To implement left associativity for an operator we use left recursion. -
| | | | | | | | | | | | |


CORRECT ANSWER✔✔-true |




T/F: Denotational semantics are specified based on first order logic concepts. -
| | | | | | | | | | | |


CORRECT ANSWER✔✔-false |

, T/F: There is only one non-terminal on the RHS of a rule in regular grammars. -
| | | | | | | | | | | | | | | |


CORRECT ANSWER✔✔-true |




T/F: Operational semantics present the meanings of language's constructs in the
| | | | | | | | | | |


form of smaller actions. - CORRECT ANSWER✔✔-true
| | | | | |




T/F: In a DFA, there can be more than one transition out from a state for an input.
| | | | | | | | | | | | | | | | |


- CORRECT ANSWER✔✔-false
| | |




T/F: In Axiomatic semantics, the strongest precondition is the one that is logically
| | | | | | | | | | | | |


implied by all other preconditions. - CORRECT ANSWER✔✔-false
| | | | | | |




T/F: The static semantics are mostly used to prove the correctness of programs. -
| | | | | | | | | | | | | |


CORRECT ANSWER✔✔-false |




T/F: In regular grammars the epsilon symbol is a special non-terminal symbol
| | | | | | | | | | | |


which can be replaced with another symbol. - CORRECT ANSWER✔✔-false
| | | | | | | | |




it is a terminal. it cannot be replaced
| | | | | | |




In an attributes grammar an intrinsic attribute gets its value from ......
| | | | | | | | | | |




the children of the node
| | | |




the parent of the node
| | | |




the symbol table
| |

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Lectphilip West Virginia University
Follow You need to be logged in order to follow users or courses
Sold
178
Member since
1 year
Number of followers
6
Documents
19179
Last sold
1 day ago
WELCOME TO LECTPHILIP, A PLACE WHERE WE UNLOCK YOUR ACADEMIC OPPORTUNITIES

On this page, you find all documents, package deals and flashcards offered by seller lectphilip

4,1

28 reviews

5
14
4
6
3
5
2
2
1
1

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions