Quiz
Exam 1
Crie uma conta grátis para terminar este quiz
Salve seu progresso e veja sua nota final.
Já tem uma conta? Inicie sessão
Perguntas do quiz (12)
1An NFA's transition function returns
- AA Boolean value
- BA state
- CA set of states
- DAn edge
2Can a DFA simulate NFA
- ANo
- BYes
- CSometimes
- DDepends on NFA
3In Flex, which of the following specifies an exclusive start condition HELLO?
- A%s HELLO
- B%x HELLO
- C%%x HELLO
- D%%s HELLO
4In C++, which of the following is NOT considered as a static semantic error
- AVariables used without declaration
- BRedefinition of variables in the same scope
- CThe number of arguments in a function call doesn't match the number of parameters in the function definition
- DTypes of operands of an operator are not compatible
- ENone of the above
5Which of the following files is generated by Flex?
- Atiger.ll
- Btiger.yy
- Clex.yy.cc
- Dtokens.h
- Etiger.tab.cc
6Which one of the following is not a stage of the compilation process?
- ASyntax Analysis
- BSemantic Analysis
- CScanner Generator
- DLexical Analysis
7The lexical analyzer takes _______ as input and produces a stream of ______ as output.
- AToken, source program
- BEither of the two
- CSource program, tokens
- DNone of the mentioned
8The scanner generator takes _______ as input and produces ______ as output.
- ARegular expressions, tokens
- BRegular expressions, scanner
- CLexeme, scanner
- DToken, scanner
9Which of the following is NOT a feature of compiler?
- AScan the entire program first and translate into machine code
- BTo detect syntax errors
- COptimize the generated code
- DExecution time is more comparing with pure interpreter
10Which of the following pairs of regular expressions are equivalent?
- A1(01)* and (10)*1
- Bx(xx)* and (xx)*x
- Cx+ and x+x*
- DAll of the mentioned
11The language of the regular expression (x | y)(x |y) is the set_____.
- A{xy, xy}
- B{xx, xy, yx, yy}
- C{x,y}
- D{x, y, xy}
12The language of the regular expression x | y is the set ______.
- A{x, y}
- B{xy}
- C{x}
- D{y}
Informações
- Descrição
- This is a study guide for Compiler exam one.
- Autor
- Thomas Scott
- Idioma
- English
- Visualizações
- 38
- Etiquetas
- Avaliação
- Ainda sem avaliações Avalie este quiz