Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 3 fuera de 22 páginas
Examen

Compiler Construction Midterm Exam Questions And Answers

Document preview thumbnail
Vista previa 3 fuera de 22 páginas

©SIRJOEL EXAM SOLUTIONS 2024/2025 ALL RIGHTS RESERVED. 1 | P a g e Compiler Construction Midterm Exam Questions And Answers Every compiler converts a(n) ___ program to a(n) ___ program. - AnswersTrue An on-demand backup can negatively impact a table's performance and availability. (T/F) - AnswersFalse What type of compilers do many Java interpreters use? - Answersjust-in-time What do macros get converted into? - Answerssource language statements What does the assembler do? - AnswersConverts assembly code into machine code. What are the two main parts of a compiler? - Answersanalysis and synthesis The analysis part of the compiler passes what two things on to the synthesis part? - Answersintermediate representation and symbol table The synthesis part of a compiler is also called the - Answersback end. The symbol table is - Answersused by all phases of the compiler. Another name for scanning is - Answerslexical analysis. ©SIRJOEL EXAM SOLUTIONS 2024/2025 ALL RIGHTS RESERVED. 2 | P a g e In the lexical analyzer example in the book, what are the token names? - Answersid, 60, =, +, * Another name for parsing is - Answerssyntax analysis. In a syntax tree an interior node represents - Answersan operation. In the example in sections 1.2.1 and 1.2.2, what does id, 3 represent? - Answersrate In what stage is the syntax tree built? - Answerssyntax analysis In what stage does type checking occur? - Answerssemantic analysis The example on coercion uses - Answersan integer and a float. Which is not an example of an intermediate representation? - Answerssymbol table Which is not a reason given in the book to optimize code? - Answersreadable target code Where are variable and procedure names stored? - Answerssymbol table How can we support multiple target machines for a single source language? - Answersmultiple back ends In a generation classification of programming languages, Java is what? - Answersthird- generation The problem of generating the optimal target code from a source program is - Answersundecidable. ©SIRJOEL EXAM SOLUTIONS 2024/2025 ALL RIGHTS RESERVED. 3 | P a g e Of the four design objectives of compiler optimizations, which is the most important? - Answerscorrectness What do finite-state machines and regular expressions model? - Answerskeywords and identifiers What early feature of the C programming language was useful early on but actually could result in inefficient code if used today? - Answersthe register keyword What compiler optimizations analyze the flow of data through a program? - Answersdata- flow optimizations Java has many features listed in the reading that make programming easier. What is true about all of them? - AnswersThey incur run-time overhead. What can be found in most computers both at the instruction level and at the processor level? - Answersparallelism According to the book, what is probably the single most important problem in optimizing a program? - Answersusing registers effectively In the old days, compilers were developed _______ computer architecture design. - Answersafter The x86 processor - Answershas a CISC instruction set but it is most effective when only its simple instructions are used. ©SIRJOEL EXAM

Vista previa del contenido

©SIRJOEL EXAM SOLUTIONS 2024/2025

ALL RIGHTS RESERVED.




Compiler Construction Midterm Exam
Questions And Answers

Every compiler converts a(n) ___ program to a(n) ___ program. - Answers✔True


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

Answers✔False


What type of compilers do many Java interpreters use? - Answers✔just-in-time


What do macros get converted into? - Answers✔source language statements


What does the assembler do? - Answers✔Converts assembly code into machine code.


What are the two main parts of a compiler? - Answers✔analysis and synthesis


The analysis part of the compiler passes what two things on to the synthesis part? -

Answers✔intermediate representation and symbol table


The synthesis part of a compiler is also called the - Answers✔back end.


The symbol table is - Answers✔used by all phases of the compiler.


Another name for scanning is - Answers✔lexical analysis.


1|Page

, ©SIRJOEL EXAM SOLUTIONS 2024/2025

ALL RIGHTS RESERVED.
In the lexical analyzer example in the book, what are the token names? - Answers✔id, 60, =, +,

*


Another name for parsing is - Answers✔syntax analysis.


In a syntax tree an interior node represents - Answers✔an operation.


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


In what stage is the syntax tree built? - Answers✔syntax analysis


In what stage does type checking occur? - Answers✔semantic analysis


The example on coercion uses - Answers✔an integer and a float.


Which is not an example of an intermediate representation? - Answers✔symbol table


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


Where are variable and procedure names stored? - Answers✔symbol table


How can we support multiple target machines for a single source language? -

Answers✔multiple back ends


In a generation classification of programming languages, Java is what? - Answers✔third-

generation


The problem of generating the optimal target code from a source program is -

Answers✔undecidable.


2|Page

, ©SIRJOEL EXAM SOLUTIONS 2024/2025

ALL RIGHTS RESERVED.
Of the four design objectives of compiler optimizations, which is the most important? -

Answers✔correctness


What do finite-state machines and regular expressions model? - Answers✔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? - Answers✔the register keyword


What compiler optimizations analyze the flow of data through a program? - Answers✔data-

flow optimizations


Java has many features listed in the reading that make programming easier. What is true about

all of them? - Answers✔They incur run-time overhead.


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

Answers✔parallelism


According to the book, what is probably the single most important problem in optimizing a

program? - Answers✔using registers effectively


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

Answers✔after


The x86 processor - Answers✔has a CISC instruction set but it is most effective when only its

simple instructions are used.



3|Page

Información del documento

Subido en
10 de diciembre de 2024
Número de páginas
22
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$11.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
sirjoel
3.6
(18)
Vendido
133
Seguidores
13
Artículos
12782
Última venta
1 mes hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes