# SUPERSTARWEBTECH

There is no elevator to success. You have to take the stairs. Take your first steps with SSWT!

# CS606 Compiler Construction Quiz MCQs Lecture 23-30 Objective Questions

CS606-Compiler Construction Quiz #Objective #Questions

1. NFA of LR(1) items means ___

• no look-ahead
• look-ahead one symbols ✔
• look-ahead all symbols
• None

2. In the Parsing Table, the rows correspond to Parsing DFA states and columns correspond to ___

• Terminals and Non-terminals ✔
• Start Symbol and its derivation
• Handles and derivations
• None

3. A grammar is LR if a ___ shift reduce-reduce parser can recognize handles when they appear on the top of the stack

• left-to-reverse
• left-to-rise
• left-to-right ✔
• None

4. If / is a set of items for grammar then closure(/) is a set of items constructed from / by the following rule.

• If A-> aX.Y is in closure(/) and Y->r is production, then add X->.r to closure(/)
• If A->a.XY is in closure(/) and X->r is production, then add X->.r to closure(/) ✔
• If A->aXY. is in closure(/) and A->r isproduction, then add X->.r to closure(/)
• None

5. Suppose ? begins with symbol X which may be a terminal (token) or non-terminal. The item can be written as A?Xa.?

• True ✔
• False

6. A handle is a substring that matches a ___ side of production rule in the grammar.

• right hand✔
• left hand

7. If T->XYZ is a production of grammar G then which of the following item indicates that a string derivable from X has been seen so far on the input and we hope to see a string derivable from YZ next on the input.

• T->.XYZ
• T->X.YZ ✔
• T->XY.Z
• T->XYZ.

8. In the canonical collection procedure, a DFA can not be constructed from NFA using the subset construction, similar to the one we used for lexical analysis.

• True
• False ✔

9. Suppose ? begins with symbol X which may be a terminal (token) or non-terminal. The item can be written as ___

• A?a.X?
• A?Xa.? ✔
• A?X?.
• X?Aa.?

10. If / is a set of items for grammar then closure(/) is a set of items constructed from / by the following rule.

• Every item in / is in closure(/) ✔
• Every item in / is not in closure(/)
• Only one item in / is in closure(/)
• None

11. NFA of LR(0) items means ___

• no look ahead symbol ✔
• look ahead one symbol
• look ahead all symbols
• All of the given

## Author

### Anam Afzal

Hi, I'm a Pakistani freelancer with a passion for helping businesses achieve their online goals through no-code solutions. I specialize in WordPress customization and ManyChat automation, and I'm always on the lookout for new ways to use technology to make businesses more efficient and successful. I'm also a big believer in the power of no-code tools to democratize technology and make it accessible to everyone. I'm passionate about sharing my knowledge and helping others learn how to use no-code tools to create their own websites, automate their workflows, and grow their businesses. If you're looking for a reliable and experienced no-code developer, I'm here to help. Please feel free to contact me to discuss your project requirements.
SHARE THIS POST
Blog

Blog

Blog