Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 3 out of 24 pages
Exam (elaborations)

Compiler Construction Midterm UPDATED ACTUAL Exam Questions and CORRECT Answers

Document preview thumbnail
Preview 3 out of 24 pages

Compiler Construction Midterm UPDATED ACTUAL Exam Questions and CORRECT Answers Every compiler converts a(n) ___ program to a(n) ___ program. - CORRECT ANSWER True An on-demand backup can negatively impact a table's performance and availability. (T/F) - CORRECT ANSWER - False What type of compilers do many Java interpreters use? - CORRECT ANSWER time What do macros get converted into? - CORRECT ANSWER What does the assembler do? - CORRECT ANSWER machine code. What are the two main parts of a compiler? - CORRECT ANSWER synthesis The analysis part of the compiler passes what two things on to the synthesis part? - CORRECT ANSWER - intermediate representation and symbol table The synthesis part of a compiler is also called the - CORRECT ANSWER The symbol table is - CORRECT ANSWER - used by all phases of the compiler. Another name for scanning is - CORRECT ANSWER - - just-in

Content preview

Compiler Construction Midterm UPDATED
ACTUAL Exam Questions and CORRECT
Answers
Every compiler converts a(n) ___ program to a(n) ___ program. - CORRECT ANSWER -
True


An on-demand backup can negatively impact a table's performance and availability. (T/F) -
CORRECT ANSWER - False



What type of compilers do many Java interpreters use? - CORRECT ANSWER - just-in-
time


What do macros get converted into? - CORRECT ANSWER - source language statements



What does the assembler do? - CORRECT ANSWER - Converts assembly code into
machine code.


What are the two main parts of a compiler? - CORRECT ANSWER - analysis and
synthesis


The analysis part of the compiler passes what two things on to the synthesis part? - CORRECT
ANSWER - intermediate representation and symbol table



The synthesis part of a compiler is also called the - CORRECT ANSWER - back end.



The symbol table is - CORRECT ANSWER - used by all phases of the compiler.



Another name for scanning is - CORRECT ANSWER - lexical analysis.

,In the lexical analyzer example in the book, what are the token names? - CORRECT
ANSWER - id, 60, =, +, *



Another name for parsing is - CORRECT ANSWER - syntax analysis.



In a syntax tree an interior node represents - CORRECT ANSWER - an operation.


In the example in sections 1.2.1 and 1.2.2, what does <id, 3> represent? - CORRECT
ANSWER - rate



In what stage is the syntax tree built? - CORRECT ANSWER - syntax analysis



In what stage does type checking occur? - CORRECT ANSWER - semantic analysis



The example on coercion uses - CORRECT ANSWER - an integer and a float.



Which is not an example of an intermediate representation? - CORRECT ANSWER -
symbol table


Which is not a reason given in the book to optimize code? - CORRECT ANSWER -
readable target code


Where are variable and procedure names stored? - CORRECT ANSWER - symbol table


How can we support multiple target machines for a single source language? - CORRECT
ANSWER - multiple back ends

, In a generation classification of programming languages, Java is what? - CORRECT
ANSWER - third-generation


The problem of generating the optimal target code from a source program is - CORRECT
ANSWER - undecidable.


Of the four design objectives of compiler optimizations, which is the most important? -
CORRECT ANSWER - correctness



What do finite-state machines and regular expressions model? - CORRECT ANSWER -
keywords and identifiers


What early feature of the C programming language was useful early on but actually could result
in inefficient code if used today? - CORRECT ANSWER - the register keyword


What compiler optimizations analyze the flow of data through a program? - CORRECT
ANSWER - data-flow optimizations


Java has many features listed in the reading that make programming easier. What is true about all
of them? - CORRECT ANSWER - They incur run-time overhead.


What can be found in most computers both at the instruction level and at the processor level? -
CORRECT ANSWER - parallelism


According to the book, what is probably the single most important problem in optimizing a
program? - CORRECT ANSWER - using registers effectively


In the old days, compilers were developed _______ computer architecture design. - CORRECT
ANSWER - after

Document information

Uploaded on
April 9, 2025
Number of pages
24
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$13.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
MGRADES
4.0
(232)
Sold
1526
Followers
109
Items
107179
Last sold
2 hours ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions