Sale!

Original price was: ₹200.00.Current price is: ₹20.00.

Compiler Test: Attention all Compiler Design Students! Tailor-made for GATE, NET, DRDO, and ISRO aspirants! Ideal for students in India and worldwide! Take on 55 MCQs in 1 Hour and aim for a 60% Pass. Test your knowledge now on Nuutan.com! Buy Now.

To Succeed, You Must Unlock the Potential of Learning. A PASSWORD will be sent to the email address you specify when you make your purchase of this premium academic product. Simply enter this password to begin an in-depth online test on Nuutan.com. Please note that the provided password is valid for a full 10 days from the date of purchase, giving you plenty of time to look around. Take advantage of this once-in-a-lifetime chance and start your path to becoming an expert right now!

Categories: , , , , , Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Product ID: 3485

Description

Compiler Test – Assessing Your Compiler Design Knowledge

0%

Students of computer science and information technology can take this MCQ-based practice test online. Students studying Computer Science and Information Technology will benefit from completing this practice test to get a taste of the subject matter included on the GATE, NET, and DRDO examinations, as well as the level of difficulty involved in each of them. Compiler design is a topic that is commonly covered in courses given at foreign institutions; thus, this practice exam may be useful to students pursuing studies at international universities.

TIME ENDS

Created by A guru on the website nuutan.com

Compiler Test: 55 Multiple Choice Questions in 1 Hour; minimal 60% to pass; beneficial for GATE, NET, SLET, DRDO, ISRO, etc.

The task at hand consists of a test of knowledge with multiple-choice questions on the topic of compiler design. For individuals who already have some background knowledge on the topic, there are a total of 55 multiple-choice questions (MCQs) available. Every multiple-choice question has not one but two individual technical statements. The correct answers to the multiple-choice questions, together with an explanation of each one in further depth, will be displayed online as soon as possible after the exam.

If your score is 60% or higher, we will issue a certificate that will be sent to your email. CORRECTLY COMPLETE THE FOLLOWING:

1 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

1) Take into consideration the following statements:

Statement1:

When a 'missing' token is inserted by the YACC parser generator's error handling mechanism, the input stream is pushed back.

Statement2:

The recursive descent parser is made up of (recursive) routines, and each routine corresponds to a rule in the grammar in a very close way. An empty production, denoted by the notation N -> ɛ, ‘translates’ to a routine that returns true without doing any token inspection.

Among the options given, which one is most accurate?

2 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

2) Take into consideration the following statements:

Statement1:

Examine the grammar.

(1)        S -> A$

(2)        A -> BCD

(3)        | EFG

(4)        B -> De

(5)        C -> a

(6)        | cc

(7)        D -> d

(8)        | ɛ

(9)        E -> Ge

(10)      F -> f

(11)      | c

(12)      G -> g

(13)      | ɛ

The grammar that is given is LL(1), LL(2), and LL (3).

Statement2:

term -> IDENTIFIER | IDENTIFIER ‘[‘ expression ‘]’

By using substitution, this grammar can be made LL(1).

Among the options given, which one is most accurate?

3 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

3) Take into consideration the following statements:

Statement1:

Whenever the current input token is a member of the FOLLOW set for a certain production rule, only then will an SLR(1) parser reduce that rule.

S -> AB

A -> ε | aA

B -> b | bb

There are 2 elements in FOLLOW(A).

Statement2:

When building an LR(1) parser, we make a note for each item of exactly in which context it appears. This allows us to resolve a large number of conflicts that are common in SLR(1) parsers that are based on FOLLOW sets. The look-ahead set that is connected to an LR(1) item consists of just one individual element.

Among the options given, which one is most accurate?

4 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

4) Take into consideration the following statements:

Statement1:

It is possible for the following two items, A -> P.Q and B -> P.Q, to co-exist within an LR item set.

Statement2:

The solution of shift-reduce conflicts caused by ambiguous grammars is already included into YACC because to the built-in support it provides. The shift action, which is what is done by default, resolves these conflicts.

Among the options given, which one is most accurate?

5 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

5) Take into consideration the following statements:

Statement1:

Languages that are interpreted rather than compiled typically have a faster execution time.

Statement2:

There are a finite number of sentences in a finite language. Therefore, it is impossible to define a finite language with an ambiguous grammar.

Among the options given, which one is most accurate?

6 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

6) Take into consideration the following statements:

Statement1:

When making a top-down parser, we must find the FIRST sets of all alternative productions. The FIRST set of an alternative a, FIRST(a), contains all the terminals a that can start with. If a can produce the empty string ε, this ε is also in FIRST(a).

S -> AB

A -> ε | aA

B -> ε | bB

FIRST(S) contains 2 elements.

Statement2:

Examine the grammar.

(1) S -> AB$

(2) A -> xA

(3) A -> B

(4) B -> yzB

(5) B -> z  

The PREDICT set of production-1 is {x, y}.

Among the options given, which one is most accurate?

7 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

7) Think about the following example of grammar:

S -> Aa | b | bB

A -> a

B -> b

Take into consideration the following statements:

Statement1:

The top-down way of parsing works more efficiently for this particular grammar.

Statement2:

The bottom-up way of parsing works more efficiently with this particular grammar.

Among the options given, which one is most accurate?

8 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

8) Take into consideration the following statements:

Statement1:

The dotted item (T -> a.b) keeps track of whatever part of a token has been matched already. There are two different categories of basic items: REDUCE items and SHIFT items.

fixed point -> ([0-9])* ‘.’ (.[0-9])+

This is an item that requires SHIFT.

Statement2:

A LR parser reads the input stream from right to left and examines each token in the stream in that order.

Among the options given, which one is most accurate?

9 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

9) Take into consideration the following statements:

Statement1:

A lexical analyzer takes a stream of characters and turns them into a stream of tokens. For use by the parser, the tokens are saved in a table called the symbol table.

Statement2:

The token-recognizing FSA (Finite State Automata) is generated automatically by the lexical analyzer generator. CFG powers the generator.

Among the options given, which one is most accurate?

10 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

10) Take into consideration the following statements:

Statement1:

For regular (type 3) grammars, top-down methods are more effective than bottom-up methods.

Statement2:

Using the bottom-up method is better than the top-down method if a regular grammar only has two possible productions, A -> a and A -> Ba

Among the options given, which one is most accurate?

11 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

11) Take into consideration the following statements:

Statement1:

A recursive descent parser is made up of a collection of recursive routines, with each routine being very similar to a rule in the language. When a routine successfully matches a production and returns true, it has used at least one token from the input stream. This indicates that the routine has been successful.

Statement2:

The stack that is utilized in a bottom-up parser has a sequence of terminal symbols and states that alternate with one another.

Among the options given, which one is most accurate?

12 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

12) Take into consideration the following statements:

Statement1:

Type-0 and Type-1 parsing algorithms are all exponentially time dependent.

Statement2:

Type-2 (context-free) grammars are supported by much more advanced parsing algorithms than Types 0 and 1.

Among the options given, which one is most accurate?

13 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

13) Take into consideration the following statements:

Statement1:

If the grammar is LR(1), then a top-down parser can process it.

Statement2:

YACC's output parser is essentially a Pushdown Automata.

Among the options given, which one is most accurate?

14 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

14) Take into consideration the following statements:

Statement1:

When ‘missing’ tokens are inserted, the error handling mechanism of the LLgen parser generator will push the input stream back.

Statement2:

The symbol table is only used to communicate between successive phases of the compiler pipeline (lexical analysis, semantic analysis, etc.).

Among the options given, which one is most accurate?

15 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

15) Take into consideration the following statements:

Statement1:

Handles (the right-hand side of a production N) are only reduced by the SLR(1) parsing method when the current input token is part of the FOLLOW(N).

Statement2:

In order to resolve LL(1) conflicts in a grammar, we can use Left-factoring, Substitution, and Left-recursion removal. FIRST/FOLLOW conflicts can be avoided through substitution.

Among the options given, which one is most accurate?

16 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

16) Take into consideration the following statements:

Statement1:  

The nodes of an AST (Abstract Syntax Tree) are generated in post-order by a bottom-up parser.

Statement2:  

A bottom-up SLR(1) parser uses a table that combines the GOTO and ACTION tables.

Among the options given, which one is most accurate?

17 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

17) Take into consideration the following statements:

Statement1:

S -> A | xb

A -> aAb | x

There's a conflict between reduce and reduce in this grammar.

Statement2:

When the current input token is an element of FOLLOW(N), the LR (1) parsing method reduces a handle (the right-hand side of a production N -> ɛ ).

Among the options given, which one is most accurate?

18 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

18) Take into consideration the following statements:

Statement1:

Examine the grammar.

(1)        S -> A$

(2)        A -> abcDE

(3)        | abE

(4)        D -> Dd

(5)        | e

(6)        E -> f

Although it contains some common prefixes, grammar is not left recursive.

Statement2:

S -> aS | Sb | c

The grammar here is ambiguous.

Among the options given, which one is most accurate?

19 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

19) Take into consideration the following statements:

Statement1:

Context-free grammars are used for practically all practical parsing, and almost all of the issues that arose when context-free parsing was first developed have been resolved. It is because of the locality of the context-free production process, which indicates that the development of one non-terminal in the sentential form is completely independent of the development of any other non-terminal, and that during the parsing process; we are able to combine partial parse trees regardless of the histories of those trees. In a grammar that is sensitive to context, neither of these reasons holds true.

Statement2:

Parsing context-free grammars can be done in two different ways: either from the top down or the bottom up.

Among the options given, which one is most accurate?

20 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

20) Take into consideration the following statements:

Statement1:

Dotted item (T -> a.b) record which part of a token has already been matched. There are two kinds of basic items: SHIFT items and REDUCE items.

Integer -> (.[0-9])+

This is a reduce item

Statement2:

A top-down parser creates the nodes in the AST (Abstract Syntax Tree) in pre-order.

Among the options given, which one is most accurate?

21 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

21) Take into consideration the following statements:

Statement1:

It is essential for a CFG (Context Free Grammar) that the collection of terminal and non-terminal symbols be distinct from one another.

Statement2:

S -> a | B

A -> Bb | ε

The non-terminal B is left recursive.

Among the options given, which one is most accurate?

22 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

22) Take into consideration the following statements:

Statement1:

S -> A | x

A -> aAb | x

This grammar do not contains a conflict.

Statement2:

S -> aS | Sa | c

This grammar is ambiguous.

Among the options given, which one is most accurate?

23 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

23) Take into consideration the following statements:

Statement1:

In top-down parsing, the production tree is reconstructed from the top down, while in bottom-up parsing, the sentence is reduced down to the start symbol.

Statement2:

It is feasible to construct some portions of the production tree from the bottom-up while working on other portions from the top-down. The ‘left-corner’ approach is one that identifies production rules in ‘infix order’, and its name comes from that.

Among the options given, which one is most accurate?

24 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

24) Take into consideration the following statements:

Statement1:

It is not always possible to build a parser for a grammar of Type-0; however for a grammar of Type-1 it is always possible to do so.

Statement2:

Type-0 and Type-1 grammars are not user-friendly for humans.

Among the options given, which one is most accurate?

25 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

25) Take into consideration the following statements:

Statement1:

The LALR(1) grammar is handled by the YACC parser generator.

Statement2:

An essential part of YACC is the ability to deal with ambiguous grammars that cause shift-reduce conflicts. Normally, the reduction operation is what is used to resolve these sorts of conflicts.

Among the options given, which one is most accurate?

26 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

26) Take into consideration the following statements:

Statement1:

Although LL(1) parsers are often constructed by a parser generator, it is possible to write a simple version by hand with recursive-descent techniques.

Statement2:

The RR(1) technique is what's called when the LL(1) algorithm is applied starting from the very last token of the input and working backwards.

Among the options given, which one is most accurate?

27 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

27) Take into consideration the following statements:

Statement1:

By applying Left-factoring, Left-recursion removal, and Substitution, grammars that have LL(1) conflicts can be converted LL(1). Conflicts between FOLLOW and FOLLOW can be resolved using substitution.

Statement2:

term -> IDENTIFIER | IDENTIFIER ‘[‘ expression ‘]’

By removing left-recursion, this grammar can be made to fit to LL(1) standards.

Among the options given, which one is most accurate?

28 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

28) Take into consideration the following statements:

Statement1:

The big issues with top-down and bottom-up context-free parsing are that it can create loops and that its algorithm takes an exponential amount of time. This is because in top-down parsing, if one of the predictions is wrong, we have to fix it by TRIAL and ERROR, and in bottom-up parsing, the correct identification of the handle is done by TRIAL and ERROR.

Statement2:

When performing bottom-up parsing, the process begins with the input, and from there, an attempt is made to reduce it to the start symbol. The input is first reduced to its sentential form, which occurs around half-way through the process. This form must contain a substring that was the outcome of the final production step that resulted in the formation of the sentential form; this substring is the right hand side of the production and is referred to as the handle of the sentential form.

Among the options given, which one is most accurate?

29 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

29) Take into consideration the following statements:

Statement1:

Parsing techniques can also be classified according to whether they are non-directional or directional, in addition to top-down and bottom-up.

Statement2:

A non-directional method develops the parse tree while accessing the input in whichever order it sees fit; as a result, it needs that the full input be in memory before parsing can begin. This is because a non-directional method constructs the parse tree while accessing the input. Both a top-down and a bottom-up version are available.

Among the options given, which one is most accurate?

30 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

30) Take into consideration the following statements:

Statement1:

According to Unger's description, the non-directional top-down method is one that is easy to understand and implement.

Statement2:  

Cocke, Younger, and Kasami were the first to describe the non-directional bottom-up method, hence it is also known as the CYK method after the initials of those different researchers.

Among the options given, which one is most accurate?

31 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

31) Take into consideration the following statements:

Statement1:

An example of a top-down parser is the predictive parser.

Statement2:

It is possible for a top-down parser to process a grammar that has left recursive non-terminal.

Among the options given, which one is most accurate?

32 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

32) Take into consideration the following statements:

Statement1:

LL(1) usually requires more changes to the grammar than LALR (1).

Statement2:

LL(1) lets semantic actions happen even before an alternative begins, but LALR(1) only lets semantic actions happen at the end of an alternative.

Among the options given, which one is most accurate?

33 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

33) Take into consideration the following statements:

Statement1:

The set of terminal symbols and the set of non-terminal symbols can overlap in a CFG (Context Free Grammar).

Statement2:

An input stream of characters is converted into an output stream of tokens using a lexical analyzer.

Among the options given, which one is most accurate?

34 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

34) Take into consideration the following statements:

Statement1:

For any type 0 grammar, there is no way to solve the recognition problem. This means that there can't be an algorithm that takes an arbitrary type 0 grammar and an arbitrary string and tells us in a finite amount of time if the grammar can produce the string or not.

Statement2:

Using some technique, it is possible to make a recognizer that works for some Type-0 grammars, but this technique won't work for all Type-0 grammars.

Among the options given, which one is most accurate?

35 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

35) Think about the following example of grammar:

S -> Aa | b

A -> a

Take into consideration the following statements:

Statement1:

For this particular grammar, the top-down parsing approach is the most effective.

Statement2:

When it comes to this particular grammar, the bottom-up parsing approach is the most effective.

Among the options given, which one is most accurate?

36 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

36) Take into consideration the following statements:

Statement1:  

Many parsers make a list of production numbers instead of a parse tree. This is called "linearization of parse tree." There are three main ways to make a parse tree linear: the prefix, the postfix, and the infix.

Statement2:

The parse tree is the basic link between a sentence and the grammar it was made from. It shows how the grammar was used to make the sentence.

Among the options given, which one is most accurate?

37 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

37) Take into consideration the following statements:

Statement1:

The results of using either a compiler or an interpreter are the same.

Statement2:

An infinite language can be specified by a grammar with a finite number of rules and a finite number of symbols (both non-terminal and terminal).

Among the options given, which one is most accurate?

38 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

38) Take into consideration the following statements:

Statement1:

An interpreter is a type of simulator that performs out direct execution of code written in a high-level language.

Statement2:

Both a compiler and an interpreter are able to take as input a program written in a high-level language.

Among the options given, which one is most accurate?

39 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

39) Take into consideration the following statements:

Statement1:

It is possible for an LR item set to contain both (A -> P.x) and (B -> P.x) items.

Statement2:

When building an LR (1) parser, we record for each items exactly in whatever context it appears. This allows us to resolve many of the conflicts that are present in SLR (1) parsers that are based on FOLLOW sets. There is at least one element present in the look-ahead set that is related with an LR (1) item.

Among the options given, which one is most accurate?

40 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

40) Take into consideration the following statements:

Statement1:

A sentence is essentially ambiguous if its production tree has different semantics (meanings).

Statement2:

An ambiguous sentence is spuriously (falsely) ambiguous if their production trees describe the same semantics (meanings).

Among the options given, which one is most accurate?

41 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

41) Take into consideration the following statements:

Statement1:

To process grammars with left recursive non-terminals, a bottom-up parser is sufficient.

Statement2:

S -> A | xb

A -> aAb | x

There's a conflict in this grammar.

Among the options given, which one is most accurate?

42 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

42) Take into consideration the following statements:

Statement1:

A lexical analyzer that is produced by LEX is, in essentially, a Pushdown Automata (PDA).

Statement2:

When a lexical analyzer is generated based on a token description, the item set (states) are formed by two different kinds of ‘moves.’ These moves are referred to as character moves and –moves, respectively. The use of ɛ-moves does not take up any of the input characters; rather, they merely expand non-basic items through the use of repetition and the composition operator.

Among the options given, which one is most accurate?

43 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

43) Take into consideration the following statements:

Statement1:

The CYK method is much more effective than Unger's.

Statement2:  

The input is processed one symbol at a time using directional methods, which go from left to right. In addition to that, parsing can also be done in the opposite direction, from right to left, utilizing the grammar in its mirror form. The benefit of utilizing this method is that the parsing process can begin and advance even before the very last symbol of the input is observed.

Among the options given, which one is most accurate?

44 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

44) Take into consideration the following statements:

Statement1:

It is not uncommon for a single piece of grammar to contain several production trees, which means that it is not uncommon for there to be more than one way to construct a given sentence.

Statement2:

It is said that a sentence is ambiguous if it has more than one possible production tree.

Among the options given, which one is most accurate?

45 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

45) Take into consideration the following statements:

Statement1:

A lexical analyzer generator is responsible for the automatic construction of an FSA (Finite State Automata) that is able to identify tokens. A regular description acts as the engine that drives the generator.

letter -> [a-zA-Z]

digit -> [0-9]

letter_or_digit -> letter | digit

identifier -> letter letter_or_digit*

There are two acceptable states included in the Minimum Finite State Automata when it comes to dealing with identifiers.

Statement2:

When a lexical analyzer is generated based on a token description, the item set (states) are formed by two different types of 'moves.' These moves are referred to as character-moves and ɛ-moves, respectively. The basic pattern is taken care of by the character-moves.

Among the options given, which one is most accurate?

46 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

46) Take into consideration the following statements:

Statement1:

Items A -> P.P and B -> Q.Q can both be co-exist in an LR item set.

Statement2:

A bottom-up parser makes use of a stack that holds a sequence of grammar symbols and states that alternate with one another.

Among the options given, which one is most accurate?

47 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

47) Take into consideration the following statements:

Statement1:

When developing a top-down parser, it is necessary to computerise the FIRST sets of each possible production choice. The FIRST set of an alternative a, FIRST(a), contains all terminals a can start with; if a can produce the empty string ε, this ε is included in FIRST(a).

S -> AB

A -> ε | aA

B -> ε | bB

FIRST(S) contains 3 elements.

Statement2:

By using Left-factoring, Substitution, and Left-recursion removal, grammars with LL(1) conflicts can be converted to LL(1). By utilizing left-factoring, we can avoid FIRST/FIRST conflicts.

Among the options given, which one is most accurate?

48 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

48) Take into consideration the following statements:

Statement1:

It is possible to specify languages using an attribute grammar that are not possible to specify using a context-free grammar.

Statement2:

Regular expressions can be used to define the lexical structure of even the most complicated computer languages, like Python.

Among the options given, which one is most accurate?

49 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

49) Take into consideration the following statements:

Statement1:

The entire source code being read by the lexical analyzer into memory is a necessary convenience.

Statement2:

It is true that the string patterns described by the regular expressions a+|b+ and (a|b)+ are identical.

Among the options given, which one is most accurate?

50 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

50) Take into consideration the following statements:

Statement1:

A grammar is essential ambiguous if it can make a string that is also essential ambiguous.

Statement2:

A grammar is spuriously ambiguous if it can make a string that is spuriously ambiguous but not one that is ambiguous by essence.

Among the options given, which one is most accurate?

51 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

51) Take into consideration the following statements:

Statement1:  

There are two primary approaches to parsing: the top-down method, in which the production tree is reconstructed from the top to the bottom, and the bottom-up method, in which the sentence is reduced down to the start symbol.

Statement2:  

It is possible to construct some portions of the production tree from the top down, while other parts can be constructed from the bottom up. This technique, which is known as “left-corner”, determines the production rules in ‘infix’ order.

Among the options given, which one is most accurate?

52 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

52) Take into consideration the following statements:

Statement1:

LR(1) parsing is superior to LL(1) parsing in terms of power, but it is harder to learn and less convenient to use.

Statement2:

We can also use the LR(1) technique backwards, which is when we call it the RL(1) technique.

Among the options given, which one is most accurate?

53 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

53) Take into consideration the following statements:

Statement1:

The top-down directional method performs predictions and matches, and the bottom-up directional method performs shifts and reduces.

Statement2:

There is just one linear top-down parsing method known as LL, where the first L represents left-to-right and the second L represents "identifying the leftmost production."

Among the options given, which one is most accurate?

54 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

54) Take into consideration the following statements:

Statement1:

There are many other linear bottom-up parsing algorithms, but the one that is considered to be the most effective is termed LR. ‘R’ is an abbreviation that stands for "identifying the rightmost production", and the ‘L’ in its name stands for the direction “left-to-right”.

Statement2:

It is impossible for a human to manually develop an LR parser, thus instead, parser generators are used to create such.

Among the options given, which one is most accurate?

55 / 55

Category: COMPILER DESIGN: SET 7 (MCQ) - © 2023 NUUTAN.COM. ALL RIGHTS RESERVED.

55) Take into consideration the following statements:

Statement1:

Top-down context-free parsing applies the PREDICT and MATCH method.

Statement2:

Bottom-up context-free parsing makes use of the SHIFT and REDUCE technique.

Among the options given, which one is most accurate?

We request that you kindly wait while we load the results.

Your score is

0%

Exit

REVIEWS

Take the Compiler Test and Assess Your Skills

Are you a student preparing for a Compiler Test and seeking to evaluate your proficiency? Look no further! Our Compiler Test is the perfect assessment tool designed to cater to the needs of all Compiler Design enthusiasts.

For All Compiler Design Students – Tailored Evaluation for Every Student

  • Tailored to meet the requirements of students studying Compiler Design at any educational level.
  • A comprehensive evaluation of your understanding and grasp of key concepts.

Ideal for GATE, NET, DRDO, and ISRO Aspirants – Prepare for Competitive Exams

  • A valuable resource for aspirants preparing for competitive examinations like GATE, NET, DRDO, and ISRO.
  • Helps you gauge your readiness for these challenging exams.

India and Worldwide – A Global Testing Platform

  • Suitable for students not only in India but also across the globe.
  • Offers an opportunity for international students to test their knowledge and skills.

55 MCQs in 1 Hour – Tackle Challenging Questions

  • Take on 55 thought-provoking Multiple Choice Questions within the time constraint of 1 hour.
  • A challenging assessment that demands quick thinking and strategic answering.

Aim for 60% Pass – Setting Your Success Goal

  • Set your target to achieve a minimum of 60% correct answers to succeed in the test.
  • Provides a clear performance benchmark to measure your progress.

Enhance Your Preparation – Identify Your Strengths and Weaknesses

  • An excellent platform to identify your strengths and areas of improvement.
  • Offers insights to refine your study plan and preparation strategy.

Unleash Your Potential – Join us on Nuutan.com

  • Join us on Nuutan.com for an enriching and rewarding experience of self-assessment and growth.
  • Embrace the opportunity to unlock your true potential in Compiler Design.

Don’t miss this chance to challenge yourself and embark on a journey of continuous learning and improvement with our Compiler Test. Test your knowledge, discover new insights, and elevate your expertise in the fascinating realm of Compiler Design. Join us now and take the first step towards mastering Compiler Design!

Copyright:

Copyright © 2023 Nuutan.com. All rights reserved.

Unauthorized copying or reproduction of this academic product, in whole or in part, is strictly prohibited. This Compiler Test, including all its content, questions, and assessments, is protected by copyright laws and treaties. Any illegal use of this academic product is an infringement of these rights and may result in legal action.


Discover an Ocean of Educational Resources! We provide a wide variety of learning materials that you can access through our internal links.

  • Nuutan.com is your gateway to a world of information and academic accomplishment. Books in e-book form, multiple-choice question-based online practice tests, practice sets, lecture notes, and essays on a wide range of topics, plus much more!

https://www.nuutan.com/

  • Nuutan.com is your one-stop-shop for all kinds of academic e-books, and it will greatly facilitate your educational path.

https://www.nuutan.com/product-category/k12-cuet-iit-jee-neet-gate-university-subjects

  • Online multiple-choice tests are available for a variety of subjects on Nuutan.com.

https://www.nuutan.com/product-category/multiple-choice-question

  • The Practice Sets on Nuutan.com will improve your performance in any situation.

https://www.nuutan.com/product-category/k12-cuet-iit-jee-neet-gate-cs-btech-mca

  • The in-depth lecture notes available on Nuutan.com will significantly improve your academic performance.

https://www.nuutan.com/product-category/k12-cuet-iit-jee-neet-gate-bca-mca-btech-mtech

  • Show off your writing chops and gain an edge in educational settings and in the workplace with Profound Essays from Nuutan.com.

https://www.nuutan.com/product-category/k12-competitive-exams-essays

  • Nuutan.com is a treasure trove of knowledge thanks to its free academic articles covering a wide variety of subjects. Start your academic engine!

https://www.nuutan.com/nuutans-diary

  • Discover our roots and learn how Nuutan.com came to be. Read up about us on the “About Us” page of our website!

https://www.nuutan.com/about-us

  • Embrace a Future of Knowledge and Empowerment! is the vision of the future that Nuutan.com has unveiled.

https://www.nuutan.com/vision

  • Become an author by publishing your work on the Nuutan.com platform.

https://www.nuutan.com/create-a-publication-with-us

The External Link Related to This Academic Product:

  • GOOGLE BOOKS: Here are a few Google links to help you learn about Compiler Design, including Automata Theory, which is also very helpful for getting a good grasp of Compiler Design.

(1) Mastering Compiler Design: Your Ultimate MCQ Guide to Exam Success

https://books.google.co.in/books/about/Compiler_Design_MCQ_Book.html?id=oZuLEAAAQBAJ&redir_esc=y

(2) Compiler Design MCQs: An Ultimate Practice Book

https://books.google.co.in/books?id=JOZDEAAAQBAJ&pg=PA173&lpg=PA173&dq=nuutan&source=bl&ots=r1dGahQAbC&sig=ACfU3U0eLnUM7zWw3iCP6u9e6bXDIrtxRQ&hl=en&sa=X&ved=2ahUKEwiDivXo3OOAAxVQUGwGHerYD_Q4ChDoAXoECBYQAw#v=onepage&q=nuutan&f=false

(3) Automata Theory – A Step-by-Step Approach (Lab/Practice Work with Solution)

https://books.google.co.in/books/about/Automata_Theory_A_Step_by_Step_Approach.html?id=_XkoswEACAAJ&redir_esc=y

  • YOUTUBE VIDEO:

https://www.youtube.com/watch?v=5yFdTSbqsWE

  • SCRIBD:

https://www.scribd.com/document/489307274/compiler-design-multiple-choice-questions-answers-1-pdf#

  • ACADEMIA:

https://www.academia.edu/36463069/Compiler_mcq

  • SLIDESHARE:

https://www.slideshare.net/SatyamJaiswal54/compiler-design-quiz

  • COURSE HERO:

https://www.coursehero.com/file/129056939/Compiler-MCQ-CS-702pdf/

  • BYJU’S EXAM PREP:

https://byjus.com/gate/compiler-design-mcqs/

  • DOCSITY:

https://www.docsity.com/en/compiler-design-mcq/7356849/

  • OPENGENUS:

https://iq.opengenus.org/compiler-design-mcq/

  • STUDOCU:

https://www.studocu.com/row/document/government-college-university-faisalabad/compiler-construction/compiler-construction-mcq-with-answer-explanation-principles-of-modern-compiler-design-mcq-set-sppu-exam-covid-19-time/13165841

  • GRADUATE APTITUDE TEST IN ENGINEERING (GATE) 2024:

https://gate2024.iisc.ac.in/

  • UGC NET ONLINE (SYLLABUS AVAILABLE ONLINE):

https://www.ugcnetonline.in/NTA_All_R_Syllabus/87/Computer%20Science%20and%20Applications_English%20Only.pdf

  • DRDO (CAREER WEBSITE) – RECRUITMENT AND ASSESSMENT CENTRE (RAC):

https://rac.gov.in/index.php?lang=en&id=0

  • ISRO (CAREER WEBSITE):

https://www.isro.gov.in/Careers.html

  • STATE LEVEL ELIGIBILITY TEST (SLET) – ASSAM NE REGION:

https://sletneonline.co.in/

  • STANFORD ONLINE:

https://online.stanford.edu/courses/soe-ycscs1-compilers

  • IEEE XPLORE (COMPILER DESIGN RESEARCH PAPERS):

https://ieeexplore.ieee.org/document/7814827


As a result of your constant backing and encouragement, Nuutan.com is extremely appreciative and thankful.

These are the various sharing options available for this page.