automata and compiler design

3
www.jntuworld.com JNTUWORLD Automata and Compiler Design 276) The capacity of a language to compile itself is called as a) cross-compiler b) compiler c) bootstrapping d) all 277) A compiler which runs on one machine and produces target code for another machine is called a) crisp-compiler b)compact-compiler c) overlap compiler d)cross-compiler 278) Error handler is attached to a) All the phases of the compiler b) few phases of the compiler c) No phases d) the symbol table 279) Intermediate code generation and code generation phases of a compiler gives a) The same result b) different result c) no result d) none 280) The number of phases in the compiler are a) 6 b) 5 c) any number d) 7 281) The regular expression a* denotes a) Set of all strings of one or more number of a’s b) set of all strings of zero or more number of a’s c) set of all strings of two consecutive a’s d) all the above 282) A Lex specification consists of ______________ parts a) 2 b) 3 c) 4 d) 5 283) Which of the is called as the lexical analyzer generator a) parser-generator b) compiler construction tool c) lex compiler d) compiler-compiler 284) The sequence of characters in the program that is matched by the pattern for a token is known as a) token string b) lexeme c) sentinel d) identifier 285) Which of the following are language processors? a) assemblers b) compilers c) interpreters d) all of the above 286) A translator is best described as a) application software b) system software c) a hardware component d) none www.jntuworld.com

Upload: ramya-krishna

Post on 21-Apr-2015

60 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Automata and Compiler Design

www.jntuworld.com

JNTUWORLD

Automata and Compiler Design

276) The capacity of a language to compile itself is called as

a) cross-compiler b) compiler c) bootstrapping d) all

277) A compiler which runs on one machine and produces target code for another machine is called

a) crisp-compiler b)compact-compiler c) overlap compiler d)cross-compiler

278) Error handler is attached to

a) All the phases of the compiler b) few phases of the compiler

c) No phases d) the symbol table

279) Intermediate code generation and code generation phases of a compiler gives

a) The same result b) different result c) no result d) none

280) The number of phases in the compiler are

a) 6 b) 5 c) any number d) 7

281) The regular expression a* denotes

a) Set of all strings of one or more number of a’s

b) set of all strings of zero or more number of a’s

c) set of all strings of two consecutive a’s

d) all the above

282) A Lex specification consists of ______________ parts

a) 2 b) 3 c) 4 d) 5

283) Which of the is called as the lexical analyzer generator

a) parser-generator b) compiler construction tool

c) lex compiler d) compiler-compiler

284) The sequence of characters in the program that is matched by the pattern for a token is known

as

a) token string b) lexeme c) sentinel d) identifier

285) Which of the following are language processors?

a) assemblers b) compilers c) interpreters d) all of the above

286) A translator is best described as

a) application software b) system software c) a hardware component d) none

www.jntuworld.com

Page 2: Automata and Compiler Design

www.jntuworld.com

JNTUWORLD

287. Which of the following is not a phase of compilation process

a) booting b) optimizing c) parsing d) scanning

288. A Compiler is a program that

a) Places programs into memory and prepares them for execution.

b) Automates the translation of assembly language into machine language.

c) Accept a program written in a high level language and produces an object program

d) Appears to execute a source a source program as if it were machine language.

289. Compilers can diagnose

a) Grammatical errors only b) Logical errors only

c) Grammatical as well as logical errors d) Neither grammatical not logical

290. Lexical analysis helps in

a) Simpler design of compiler b) Improving efficiency of compiler

c) Enhancing compiler portability d) All the above

291. The task of the lexical analysis phase is

a) To parse the source program into the basic elements or tokens of the language.

b) To build a literal table and an identifier table

c) To build an uniform symbol table

d) All of these

292. Which is the permanent database in the general model of a compiler?

a) literal table b) Identifier table c) terminal table d) reductions

293. An ideal compiler should

a) Be smaller in size and take less time for compiling

b) Be written in a high level language

c) Produce object code that is smaller in size and executes faster

d) All the above

294. Semantic errors can be detected

a) at compile time only b) at run time only

c) both at compile time and at run time d) none

295. Type checker checks for

a) incompatible operand b) flow of control

c) uniqueness of the object d) all the above

www.jntuworld.com

Page 3: Automata and Compiler Design

www.jntuworld.com

JNTUWORLD

296. A symbol that has different meanings depending on its content is said to be

a) Polymorphic b) inherited c) extended d) overloaded

297. Which procedure when called allows the execution of statements in its body with arguments of

different types?

a) Open procedure b) macro c) polymorphic procedure d) all

www.jntuworld.com