Ace
Learns
Theme
light_mode
dark_mode
light_mode
Light
dark_mode
Dark
monitor
Auto
Open main menu
menu_open
×
Home
History
Geography
Astronomy
Physics
Chemistry
Biology
Agriculture
Sports
Computer Science
Articles
Contact Us
MCQ Categories
Articles
Home
Contact Us
Home
»
Computer Science
»
Language Processors
»
Compiler Design
Language Processors
unfold_more
double_arrow
Assemblers
double_arrow
Code Generation and Optimization
double_arrow
Compiler Design
double_arrow
Lexical Analysis
double_arrow
Linkers
double_arrow
Loaders
double_arrow
Parsing
quiz
Compiler Design
Compiler Design and Operation
1.
What is the main function of a compiler?
A)
Translate computer code from a low-level language to a high-level language
B)
Translate computer code from a high-level language to a low-level language
C)
Execute high-level programming instructions directly
D)
Convert machine code into an executable program
Answer
keyboard_arrow_down
keyboard_arrow_up
B) Translate computer code from a high-level language to a low-level language
Explanation
2.
What is a compiler-compiler?
A)
A program that translates machine code to high-level language
B)
A program that produces compilers or parts of them
C)
A program that optimizes machine-specific code
D)
A program that interprets high-level language code
Answer
keyboard_arrow_down
keyboard_arrow_up
B) A program that produces compilers or parts of them
Explanation
3.
Which phase of the compiler is responsible for transforming source code into an intermediate representation (IR)?
A)
Front end
B)
Middle end
C)
Back end
D)
Code generation
Answer
keyboard_arrow_down
keyboard_arrow_up
A) Front end
Explanation
4.
Which of the following software translates low-level languages to higher-level ones?
A)
Interpreter
B)
Source-to-source compiler
C)
Decompiler
D)
Compiler-compiler
Answer
keyboard_arrow_down
keyboard_arrow_up
C) Decompiler
Explanation
5.
Which optimization technique is involved in the removal of code that never gets executed?
A)
Constant propagation
B)
Loop unrolling
C)
Dead-code elimination
D)
Inline expansion
Answer
keyboard_arrow_down
keyboard_arrow_up
C) Dead-code elimination
Explanation
Posts navigation
1
2
chevron_right
Quick Links
Chemistry
chevron_right
Electronic Structure and Periodicity
chevron_right
States of Matter and Solutions
chevron_right
Matter and Measurements
chevron_right
Acids Bases and Salts
Biology
chevron_right
Human Diseases
chevron_right
Essential Nutrients
chevron_right
Organs of the Human Body
chevron_right
Genetics
History
chevron_right
Enlightenment and Modern ideas
chevron_right
Revolution and Counter-Revolution
chevron_right
Industrialization
chevron_right
Medieval World History
Physics
chevron_right
Waves and Optics
chevron_right
Geometrical Optics
chevron_right
Dynamics
chevron_right
Thermodynamics