Compiler Construction MCQ :Lexical Analysis(Scanner)-Applications of Regular Expressions and Finite Automata, Input buffering, Recognition of tokens, LEX : Link1

Compiler Construction MCQ :Lexical Analysis(Scanner)-Applications of Regular Expressions and Finite Automata, Input buffering, Recognition of tokens, LEX : Link1

Compiler Construction MCQ & Answers

       Are you worried about the answers to Compiler Construction questions :Lexical Analysis(Scanner)-Applications of Regular Expressions and Finite Automata, Input buffering, Recognition of tokens, 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. Lexical analysis is about breaking a sequence of characters into--------

A. Groups                                                                        B. Packets
C. Tokens language                                                       D. Lines

Q.2. ----------is considered as a sequence of characters in a token.

A. Lexeme                                                                        B. Texeme
C. Pattern                                                                        D. Mexeme

Q.3. Tokens are grouped together into syntactic structure called as an ----------

A.tokens                                                                           B. instructions
C. expression                                                                  D. syntax

Q.4. Syntactic structure can be regarded as a tree whose leaves are the ----------.

A. tokens                                                                          B. scanner
C. macro                                                                          D. parser

Q.5. Which of the following are Lexemes?

A. Constants                                                                    B. Identifiers
C. Keywords                                                                    D. All of the above

Q.6. Which of the following statement is/are true about Regular Languages?

A. Regular Languages are the most popular for specifying tokens.
B. Regular Languages are based on simple and useful theory.
C. Regular Languages are easy to understand
D. All of the above.

Q.7. A lexeme is a sequence of characters in the source program that is matched by the pattern for a -------

A. Control flow                                                                 B. Linker
C. Token                                                                            D. None of the above

Q.8. In flex specification file, different sections are separated by------

A. **                                                                                    B. &&
C. ##                                                                                  D. %%

Q.9. Parser takes tokens from scanner and tries to generate-----------

A. Parse tree                                                                       B. Binary Search Tree
C. Binary Search and Parse tree                                     D. spanning tree.

Q.10. What are the functions of Lexical analyzer?

A. Removing comments                                                    B. Removing white space
C. Removing constants, identifiers and keywords        D. All of the above.

Q.11. The process of forming tokens from an input stream of characters is called-------.

A. Characterisation                                                           B. Liberalisation
C. Tokenization                                                                 D. None of the above

Q.12. When expression total=5+3 is tokenized then what is the token category of total?

A. Assignment operator                                                    B. Identifier
C. Integer Literal                                                               D. Addition Operator

Q.13. Which grammar defines Lexical Syntax?

A. Lexical Grammar                                                          B. Regular Grammar
C. Syntactic Grammar                                                      D. Context free Grammar

Q.14. Linear analysis is called---------in a compiler.

A. Scanning                                                                         B. Lexical analysis
C. Testing                                                                            D. Both A and B

Q.15. State true or false."A lexical analyzer reads the source code line by line."

A. True                                                                                 B. False