Questions
ayuda
option
My Daypo

ERASED TEST, YOU MAY BE INTERESTED ONCS510

COMMENTS STADISTICS RECORDS
TAKE THE TEST
Title of test:
CS510

Description:
Compilers

Author:
AVATAR

Creation Date:
25/05/2023

Category:
Others

Number of questions: 43
Share the Test:
Facebook
Twitter
Whatsapp
Share the Test:
Facebook
Twitter
Whatsapp
Last comments
No comments about this test.
Content:
Parts of the front-end ------------------ a) Scanner b) Parser c) Semantic Analyzer d) Code generator. e) Both a,b f) a,b,c g) a,b,c,d.
Parts of the back-end ------------- A-Scanner B-Parser C-Semantic Analyzer D-Code generator. E-Both a,b F-a,b,c G-a,b,c,d.
Rejects programs with unbalanced parentheses . Scanner Parser Semantic Analyzer Code generator.
Rejects programs that add integers to strings _. Scanner Parser Semantic Analyzer Code generator.
Produces Tokens as output.----------- Scanner Parser Semantic Analyzer Code generator.
Detects function with incorrect number of arguments .------------ Scanner Parser Semantic Analyzer Code generator.
Checks that every variable must be declared before it is used . Scanner Parser Semantic Analyzer Code generator.
Checks that assignment statements must end with a semicolon “;”_ . Scanner Parser Semantic Analyzer Code generator.
A compiler program written in a high level language is called source program object program machine language program none of these.
Grammar that produce two different parse trees is called Ambiguous Unambiguous Regular Chomsky.
Shift reduce parsers are Bottom up parser Top-down Parser Both A, B None of the above.
The lexical analyzer takes----------- as input and ------------- produces a list of as output. Machine code, mnemonic Tokens, source code Source code, tokens Both a and b.
----------- Checks that every variable must be declared before it is used. Scanner Parser Semantic Analyzer Code generator.
A DFA must have exactly one final accept tin state. True False.
Which of the following derivations does a topdown parser use while parsing an input string? Leftmost derivation Leftmost derivation in reverse Rightmost derivation Rightmost derivation in reverse.
_______________ group characters in tokens in the compiler? Parser Code optimizer Code Generator Scanner.
. _________A variable is declared at most once in a scope (function, class, etc.) Scanner Parser Semantic analyzer Code generation.
. ____________@ is illegal token, Not existed in the language Scanner Parser Semantic analyzer Code generation.
In a compiler, keywords of a language are recognized during_______ Parsing phase Code generation phase Lexical analysis phase Semantic analysis phase.
Type checking is normally done during____________ Parsing phase Code generation phase Lexical analysis phase Semantic analysis phase.
Which of the following parser is a top-down parser? An LALR parser A LR parser Operator precedence parser LL(1) parser.
________Detect that there is an extra “else” clause in the program that is not associated with a previous “if” Scanner Parser Semantic analyzer Code generation.
In a compiler, keywords of a language are recognized during— Parsing Phase Code generation phase Lexical analysis phase Semantic analysis phase.
Consider the following statements 1. Lexical Analysis is specified by context-free grammars and implemented by Automata. 2. Syntax Analysis is specified by regular expressions and implemented by Automata. Statement _____ are correct. A. Only 1 B. Only 2 C. Both 1 and 2 D. None of the Above.
The input of the compiler is usually a program written in ______________ A. High Level Language B. Machine Language C. Binary Language D. None of the Above.
The output of a lexical analyzer is A. Syntax Tree B. Tokens C. Machine Code D. Three Address Code.
In Compiler lexical analyzer is used for? A. Removing comments B. Removing whitespace C. Breaking program into a set of tokens D. All of the above.
Which phase of the compiler checks the grammar of the programming Languages? A. Code Optimization B. Semantic Analysis C. Code Generation D. Syntax Analysis.
Three address code has ______ A. Exactly 3 address B. At most 3 address C. At least 3 address D. None of the Above.
Complete the figure The output of Flex is a file (the name of the file after running command win_flex.exe) A. yylex B. Lex.yy.c C. yytext D. None of the above.
Which computer program accepts the high-level language and converts it into assembly language? Interpreter Linker Assembler Compiler.
Which tool is used for grouping of characters in tokens in the compiler? Parser Code optimizer Code generator Scanner.
Parsing is categorized into how many types? three types four types two types five types.
Which derivation is generated by the top-down parser? Right-most derivation in reverse Left-most derivation in reverse Right-most derivation Left-most derivation.
Which part of the compiler highly used the grammar concept? Code optimization Code generation Parser Lexical Analysis.
Lexical Analysis phase uses A. Regular Expression B. Left most derivation C. Parse tree D. None of the above.
Which of the following tasks are performed by a Lexical analyzer? (i) Identification of Lexemes (ii) Stripping-out Comments (iii) Stripping-out white spaces A. (i) B. (i), (ii) C. (iii) D. (i), (ii), (iii).
Which of the following statement(s) is/are TRUE? A. Synthesized attributes may be calculated only from attributes of children. B. Inherited attributes may be calculated only from attributes of parents. C. Both (A),(B) D. None of the above.
If the attributes of the child depends on the attributes of the parent node then it is A. Inherited B. Directed C. Synthesized D. TAC.
Which of the following parser is not a bottom up parser ? A. An LALR parser B. A LR parser C. Shift reduce parser D. LL(1) parser.
The correct order for the following processes 1. Linking 2. Assembling 3. Compiling 4. Pre-processing A. 1→2→3→4 B. 4→3→1→2 C. 4→3→2→1 D. 1→3→4→2.
Using undeclared variable is an error caught in ____Phase A. Lexical analysis B. Syntax Analyzer C. Semantic Analyzer D. Code generation.
Recursive descent parsers are___ A. LR(0) parsers B. Bottom-up parsers C. Shift reduce parsers D. None of the Above.
Report abuse Terms of use