Compiler Construction MCQ :Lexical Analysis(Scanner)-Applications of Regular Expressions and Finite Automata, LEX : Link2

Compiler Construction MCQ :Lexical Analysis(Scanner)-Applications of Regular Expressions and Finite Automata, LEX : Link2

Compiler Construction MCQ & Answers

       Are you worried about the answers to Compiler Construction questions :Lexical Analysis(Scanner)-Applications of Regular Expressions and Finite Automata, LEX? We have arranged the Show Answer button under the each question. Candidates can click on it to know the right option among the given alternatives. Furthermore, the applicants can check our web portal @ www.totalmcq.com to take part in more MCQ on various subject. Wish, the given information about the Compiler Construction MCQ will helpful to the advance and can learn the various types of questions and answers.


Q.1. Which of the following is the task of lexical analysis?

A. To initialize the variables
B. To build the uniform symbol table
C. To organize the variables in a lexical orderlanguage
D. None of the above.

Q.2. Input of Lex is?

A. Statement                                                                  B. Numeric data
C. ASCII data                                                                  D. set to regular expression

Q.3. Yacc semantic action is a sequence of----------

A. tokens                                                                          B. C statement
C. Expression                                                                  D. Rules

Q.4. Which of the following software tool are parser generator ?

A. Yacc                                                                               B. Lex
C. Both A and B                                                                D. None of the above.

Q.5. A Lex compiler generates-----------

A. Transition tables                                                           B. Lex object code
C. C Tokens                                                                        D. None of the above.

Q.6. Symbolic names can be associated with--------

A. operand                                                                          B. data or instruction
C. mnemonic operation                                                    D. Information

Q.7. The phase of compilation which involves type checking is-------

A. Syntax directed translation                                         B. Parsing
C. Scanning                                                                        D. Semantic Analyzer

Q.8. YACC stands for-----------

A. yet accept compiler compiler                   B. yet another compiler compiler
C. yet accept compiler constructs               D. yet another compiler constructs

Q.9. Which function is used to start and resume scanning in lex program?

A. yyerror                                                                           B. yytext
C. yylex tree                                                                       D. yywrap

Q.10. A Compiler has ....... phases.

A. 7                                                                                      B. 8
C. 9                                                                                     D. 6

Q.11. The action part of lex program is included in -------section.

A. Rule                                                                                 B. Declaration
C. Procedure                                                                      D. Body

Q.12. State true or false. “ input buffer is used for storing characters from source file.”

A. True                                                                                 B. False

Q.13. Which of the following is an application of Finite Automaton?

A. Grammar Parsers                                                          B. Compiler Design
C. Text Searching                                                               D. All of the above

Q.14. What is/are the applications of regular expression?

A. Designing compilers                                           B. simulating sequential circuits
C. Developing text editors                                     D. All of the above.

Q.15. Which is the application of NFA

A. A regular language is produced by union of two regular languages
B. The concatenation of two regular languages is regular
C. The Kleene closure of a regular language is regular
D. All of the above.