• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 3 fuera de 23 páginas
Examen

Cse 240 Introduction To Programming Languages Midterm Examination: Study Guide | Latest Update 2026/2027 | Practice Questions And Answers | Exam Review

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

This comprehensive examination preparation document is designed for candidates preparing for the CSE 240 Introduction to Programming Languages midterm examination at Arizona State University. The examination assesses mastery of programming language paradigms, including procedural C, object-oriented C++, functional Scheme, and logic Prolog. Questions are calibrated to the rigor of the 2026 CSE 240 midterm blueprint, emphasizing syntax, semantics, type systems, control structures, recursion, memory management, and paradigm-specific problem-solving. Candidates will encounter scenarios drawn from real programming environments, including code analysis, output prediction, error identification, and conceptual understanding of language design principles. The content reflects the most current course objectives, including strong versus weak typing, compilation versus interpretation, and the relationship between programming paradigms and hardware execution.

Vista previa del contenido

1|Page




CSE 240 INTRODUCTION TO PROGRAMMING
LANGUAGES MIDTERM EXAMINATION:
STUDY GUIDE | LATEST UPDATE 2026/2027 |
PRACTICE QUESTIONS AND ANSWERS |
EXAM REVIEW


TABLE OF CONTENTS

I. Programming Language Fundamentals and Paradigms
II. Syntax, Semantics, and Language Translation
III. Procedural Programming in C
IV. Object-Oriented Programming in C++
V. Functional Programming in Scheme
VI. Logic Programming in Prolog
VII. Recursion and Control Structures
VIII. Data Structures and Memory Management

,2|Page

question 1: What is a programming paradigm?

Correct Answer: A fundamental style or approach to programming that influences how
programs are structured and executed.

Programming paradigms provide different ways of thinking about computation, such as
imperative, object-oriented, functional, and logic programming. Each paradigm has its own
strengths and is suited to different problem domains. Understanding paradigms helps
programmers choose the right tool for a given task.

question 2: What is the primary difference between declarative and imperative programming?

Correct Answer: Declarative programming specifies what the result should be, while
imperative programming specifies how to compute the result step by step.

Imperative programming uses statements that change program state, reflecting the von
Neumann architecture. Declarative programming focuses on desired outcomes and relies on
underlying engines to determine execution details. Functional and logic programming are
examples of declarative paradigms.

question 3: What is the von Neumann architecture's influence on imperative programming?

Correct Answer: It led to the model of sequential instruction execution and mutable
memory, which is central to imperative languages.

The von Neumann architecture stores both program instructions and data in memory and
executes instructions sequentially. Imperative languages like C directly reflect this model
through variables, assignment, and control flow. This makes imperative programs efficient
but can also introduce side effects.

question 4: What is the difference between compilation and interpretation?

Correct Answer: Compilation translates the entire source program into machine code
before execution, while interpretation executes the source program directly, statement
by statement.

Compiled programs generally run faster because translation occurs ahead of time.
Interpreted programs offer better debugging and portability but are often slower. Some
languages use hybrid approaches, translating to intermediate bytecode that is then
interpreted or just-in-time compiled.

, 3|Page

question 5: What is a hybrid implementation?

Correct Answer: A language implementation that combines compilation and
interpretation, often by compiling to an intermediate representation.

Java is a classic example: source code is compiled to bytecode, which is then interpreted or
just-in-time compiled by the Java Virtual Machine. This approach balances portability and
performance. Hybrid systems are common in modern language runtimes.

question 6: What is the difference between syntax and semantics?

Correct Answer: Syntax refers to the form and structure of valid programs, while
semantics refers to the meaning or behavior of those programs.

Syntax defines which strings are legal in a language, such as matching parentheses and
correct keyword usage. Semantics defines what those syntactically valid programs do when
executed. A program can be syntactically correct but semantically wrong.

question 7: What is lexical analysis?

Correct Answer: The phase of compilation that converts a stream of characters into a
stream of tokens.

Lexical analysis, or scanning, identifies keywords, identifiers, operators, and literals. It
removes whitespace and comments. The resulting tokens are passed to the parser for
syntactic analysis.

question 8: What is parsing?

Correct Answer: The phase of compilation that analyzes the token stream according to
the language's grammar to build a parse tree or syntax tree.

Parsing checks whether the tokens form valid syntactic structures. It uses a grammar, often
expressed in BNF or EBNF. The parse tree represents the hierarchical structure of the
program.

question 9: What is orthogonality in language design?

Correct Answer: The principle that a small set of primitive constructs can be combined
in a small number of ways to build the language's control and data structures.

Información del documento

Subido en
30 de septiembre de 2026
Número de páginas
23
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$13.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
TopTier
4.0
(1)
Vendido
1
Seguidores
0
Artículos
640
Última venta
3 meses 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