compilers compilers . q1>a translator converts _____________into______________
TRANSCRIPT
www.ramkumarsjava.com
compilers
www.ramkumarsjava.com
Q1>A translator converts _____________into______________.
www.ramkumarsjava.com
Source program to object or target program
www.ramkumarsjava.com
Q2>The time of conversion from source program into object program is called ________time.
a)runtime b)boot time c)fresh time d)compile time
www.ramkumarsjava.com
compile time
www.ramkumarsjava.com
Q3>The program execution is done in compiler in_________________.
www.ramkumarsjava.com
Runtime
www.ramkumarsjava.com
Q4>_______________________+____________________=compilation. a)Analysis +Synthesis b)Analysis +Compile c)Compile +Synthesis d)Analysis +Execute
www.ramkumarsjava.com
Analysis and Synthesis
www.ramkumarsjava.com
Q5>The analysis phase is often called the _______________ of a compiler.
www.ramkumarsjava.com
Front end
www.ramkumarsjava.com
Q6>What are the 3 phases of analysis phase?
www.ramkumarsjava.com
a)Lexical Analysis b)Synthesis Analysis c)Semantic Analysis
www.ramkumarsjava.com
Q7>Syntax of any programming language is specified in terms of units called __________________.
www.ramkumarsjava.com
Tokens or terminals
www.ramkumarsjava.com
Q8>Syntax Analyzer is otherwise known as _____________. a)Scanner b)Parser c)Lexeme d) Sub scripter
www.ramkumarsjava.com
Parser
www.ramkumarsjava.com
Q9>What are the work of a semantic analyzer?
www.ramkumarsjava.com
a)Type Checking b)Type Conversions
www.ramkumarsjava.com
Q10>The synthesis phase is the ____________of a program.
www.ramkumarsjava.com
Back end
www.ramkumarsjava.com
Q11>What are the stages of synthesis of target program?
www.ramkumarsjava.com
Memory allocation Code generation and optimization
www.ramkumarsjava.com
Q12>Code optimization is done for-
www.ramkumarsjava.com
faster and shorter code
www.ramkumarsjava.com
Q13>_____________ is a data structure that is used by the compiler to hold the information about source program constructs.
www.ramkumarsjava.com
Symbol table
www.ramkumarsjava.com
Q14>What are the role of a compiler?
www.ramkumarsjava.com
-Lexical Analyzer -Syntactic Analyzer -Semantic Analyzer -Code generator -Code optimizer -Error reporter
www.ramkumarsjava.com
Q17>Code generation and optimization is not a part of synthesis phase a)True b)False
www.ramkumarsjava.com
false
www.ramkumarsjava.com
Q18>The first compiler was written by _____________ in ________for A-0 system language
www.ramkumarsjava.com
Grace Hopper,1952
www.ramkumarsjava.com
Q19>Who invented first complete compiler?
www.ramkumarsjava.com
The FORTRAN team led by John W.Backus at IBM in 1957
www.ramkumarsjava.com
Q20>___________ was one of the early commercial computers that used vacuum tubes.
www.ramkumarsjava.com
Z22
www.ramkumarsjava.com
Q21>The first known demonstrated cross platform high level language was_____________. a)FORTRAN b)COBOL c)BASIC d)ALGOL
www.ramkumarsjava.com
COBOL
www.ramkumarsjava.com
Q22>A compiler that can be written in the programming language it compiles-
www.ramkumarsjava.com
Self hosted
www.ramkumarsjava.com
Q23>The first self hosting compiler was written for LISP by_______________and ______________ in 1962.
www.ramkumarsjava.com
Tim Hart and Mike Levin
www.ramkumarsjava.com
Q24>Structure of a compiler depends on 3 factors. What are they?
www.ramkumarsjava.com
Nature of the source language Machine architecture and configuration Aims of compiler
www.ramkumarsjava.com
Q25>Different types of compiler structure are-
www.ramkumarsjava.com
Single pass compiler Multipass compiler Conventional compiler Compilers for permissive language Incremental compiler
www.ramkumarsjava.com
Q26>Strike the one out which doesn’t match for single pass compilers. -All the stages executed in single flow -Memory requirement is small -Code generated is inefficient -Faster execution
www.ramkumarsjava.com
memory requirement is small
www.ramkumarsjava.com
Q27>Pascal and FORTRAN are example of ______________compiler.
www.ramkumarsjava.com
single pass
www.ramkumarsjava.com
Q28>____________is an example of multipass compiler.
www.ramkumarsjava.com
java
www.ramkumarsjava.com
Q29>A clear cut distinction between analysis and synthesis phase is brought is _________________ a)conventional b)Incremental c)Singlepass d)Multipass
www.ramkumarsjava.com
conventional
www.ramkumarsjava.com
Q30>C is a _________________ type of compilers.
www.ramkumarsjava.com
conventional
www.ramkumarsjava.com
Q31>___________________is a language that allows declarations to be placed anywhere in a program.
www.ramkumarsjava.com
Permissive language
www.ramkumarsjava.com
Q32>Incremental compilers are invented by ______________ and __________________ in 1973 that combine the main advantages of compilers and interpreters.
www.ramkumarsjava.com
Berthaud and Griffiths
www.ramkumarsjava.com
Q33>IBM visual age c++ compiler is a ______________ compiler.
www.ramkumarsjava.com
Incremental
www.ramkumarsjava.com
Q34>IBM/360 FORTRAN H compiler is _______________ compilers.
www.ramkumarsjava.com
Optimization
www.ramkumarsjava.com
Q35>A concept of developing a compiler for a language by using subsets of the same language is called_______________. a)Bootstrapping b)Cross-compilation c)Incremental Compilation d)None of the above
www.ramkumarsjava.com
Boot strapping
www.ramkumarsjava.com
Q36>A compiler which runs on one machine and generates code for another machine is called as ______________. a)Bootstrapping b)Cross-compilation c)Incremental Compilation d)None of the above
www.ramkumarsjava.com
Cross compilation
www.ramkumarsjava.com
Q37>A cross compiler is a compiler which runs on one machine and generates code for another machine a)True b)False
www.ramkumarsjava.com
True
www.ramkumarsjava.com
Q38>Process of generating code on one machine for executing on another is called ________________.
www.ramkumarsjava.com
Cross Compilation