0% found this document useful (0 votes)
86 views4 pages

1

Uploaded by

Rana afaq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views4 pages

1

Uploaded by

Rana afaq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

1.

Compiler translates the source code to


 A. Executable code
 B. Machine code
 C. Binary code

 D. Both B and C

 Answer

2. Which of the following groups is/are token together into semantic structures?
 A. Syntax analyzer
 B. Intermediate code generation

 C. Lexical analyzer
 D. Semantic analyzer

 Answer

3. Compiler should report the presence of __________ in the source program, in translation process.
 A. Classes
 B. Objects

 C. Errors
 D. Text

 Answer

4. What is the output of lexical analyzer?


 A. A parse tree

 B. A list of tokens
 C. Intermediate code
 D. Machine code

 Answer
5. How many parts of compiler are there?
 A. 1

 B. 2
 C. 4
 D. 8

 Answer

6. Grammar of the programming is checked at _______ phase of compiler.


 A. Semantic analysis

 B. Syntax analysis
 C. Code optimization
 D. Code generation

 Answer

7. _________ is a process of finding a parse tree for a string of tokens.

 A. Parsing
 B. Analysing
 C. Recognizing
 D. Tokenizing

 Answer

8. What is the action of parsing the source program into proper syntactic classes?
 A. Lexical analysis
 B. Syntax analysis
 C. General syntax analysis
 D. Interpretation analysis

 Answer
9. Compiler can check ________ error.
 A. Logical

 B. Syntax
 C. Content
 D. Both A and B

 Answer

10. A grammar that produces more than one parse tree for some sentence is called as

 A. Ambiguous
 B. Unambiguous
 C. Regular
 D. All of these

 Answer

11. Lexical analysis is about breaking a sequence of characters into


 A. Groups
 B. Packets
 C. Lines

 D. Tokens

 Answer

12. _______ is the most general phase structured grammar.


 A. Context sensitive
 B. Regular
 C. Context free
 D. All of these

 Answer
13. ________ is considered as a sequence of characters in a token.
 A. Texeme
 B. Pattern

 C. Lexeme
 D. Mexeme

 Answer

14. What is the name of the process that determining whether a string of tokens can be generated by a grammar?
 A. Analysing
 B. Recognizing
 C. Translating

 D. Parsing

 Answer

15. A _________ is a software utility that translates code written in higher language into a low level language.
 A. Converter

 B. Compiler
 C. Text editor
 D. Code optimizer

 Answer

You might also like