adplus-dvertising

Welcome to the Context Free Grammar and Syntax Analysis MCQs Page

Dive deep into the fascinating world of Context Free Grammar and Syntax Analysis with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Context Free Grammar and Syntax Analysis, a crucial aspect of Compiler Design. In this section, you will encounter a diverse range of MCQs that cover various aspects of Context Free Grammar and Syntax Analysis, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within Compiler Design.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Context Free Grammar and Syntax Analysis. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of Compiler Design.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Context Free Grammar and Syntax Analysis. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Context Free Grammar and Syntax Analysis MCQs | Page 2 of 4

Q11.
Output file of Lex is _____ the input file is Myfile?
Discuss
Answer: (b).Myfile.yy.c
Q12.
Suppose One of the Operand is String and other is Integer then it does not throw error as it only checks whether there are two operands associated with ‘+’ or not .
Discuss
Answer: (a).True
Q13.
In Short Syntax Analysis Generates Parse Tree
Discuss
Answer: (a).True
Q14.
Assume the statements S1 and S2 given as:
S1: Given a context free grammar, there exists an algorithm for determining whether L (G) is infinite.

S2: There exists an algorithm to determine whether two context free grammars generate the same language.

Which of the following is true?
Discuss
Answer: (a).S1 is correct and S2 is not correct
Q15.
If P & R are regular and also given that if PQ=R, then
Discuss
Answer: (c).Q need not be regular
Q16.
Consider the grammar given below E? E+E | E*E | E-E | E/E | E^E | (E) | id Assume that + and ^ have the same but least precedence, * and / have the next higher precedence but the same precedence and finally ^ has the highest precedence. Assume + and ^ associate to the left like * and / and that ^ associates to the right. Choose the correct for the ordered pairs (^,^) , (-,-) , (+,+) , (*,*) in the operator precedence table constructed for the grammar
Discuss
Answer: (d).< > > >
Q17.
Given the following statements:
(i) Recursive enumerable sets are closed under complementation.
(ii) Recursive sets are closed under complements.

Which is/are the correct statements?
Discuss
Answer: (b).II only
Q18.
Assume statements S1 and S2 defined as: S1: L2-L1 is recursive enumerable where L1 and L2 are recursive and recursive enumerable respectively. S2: The set of all Turing machines is countable. Which of the following is true?
Discuss
Answer: (b).Both S1 and S2 are correct
Q19.
A regular Grammar is a?
Discuss
Answer: (a).CFG
Q20.
Which of these does not belong to CFG
Discuss
Answer: (d).End Symbol
Page 2 of 4

Suggested Topics

Are you eager to expand your knowledge beyond Compiler Design? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!