Page |1
ASU CSE 240 Midterm Exam: Comprehensive Practice Original Question
Bank (2026–2027) Comprehensive Practice Bank — Introduction to
Programming Languages C and C++ Syntax, Pointers, Memory Management,
and Programming Language Criteria
SECTION 1: PROGRAMMING LANGUAGE FUNDAMENTALS &
PARADIGMS
Question 1. What is the primary characteristic that
distinguishes the imperative programming paradigm from the
functional programming paradigm?
A) Imperative programming uses only recursion; functional
programming uses only loops
B) Imperative programming focuses on how to achieve a result
through step-by-step instructions, while functional
programming focuses on what result is desired through
expression evaluation
C) Imperative programming is always faster than functional
programming
D) Functional programming cannot use variables
Correct Answer: B
Rationale: The imperative paradigm emphasizes explicit
sequences of commands that modify program state, reflecting
the von Neumann architecture. The functional paradigm treats
, Page |2
computation as the evaluation of mathematical functions,
avoiding mutable state and side effects.
Question 2. What programming paradigm does Fortran belong
to?
A) Functional
B) Logic
C) Imperative
D) Object-oriented
Correct Answer: C) Imperative
Rationale: Fortran (Formula Translator) is an
imperative/procedural programming language. It was one of
the earliest high-level languages and follows the imperative
paradigm with step-by-step instructions.
Question 3. In the context of programming language design,
what does the term "orthogonality" refer to?
A) The speed at which a language compiles
B) The principle that a relatively small set of primitive
constructs can be combined in a relatively small number of
ways to build control and data structures
C) The number of keywords in a language
D) The ability to use multiple languages in one program
Correct Answer: B
Rationale: Orthogonality means that features of a language are
independent and do not interact in unexpected ways. High
, Page |3
orthogonality generally simplifies language learning and use,
but excessive orthogonality can lead to complexity.
Question 4. Which of the following orthogonality principles
describes this example: "If a block allows one statement, it
should allow zero or more statements within that same block"?
A) Number orthogonality
B) Type orthogonality
C) Scope orthogonality
D) Control orthogonality
Correct Answer: A) Number orthogonality
Rationale: Number orthogonality refers to the principle that a
language construct should work with any number of elements,
including zero, one, or many. If a block allows one statement, it
should also allow zero or more statements.
Question 5. What computing paradigm enforces stateless (no
side-effects) programming?
A) Imperative
B) Object-oriented
C) Functional
D) Procedural
Correct Answer: C) Functional
Rationale: Functional programming enforces stateless
programming by avoiding mutable state and side effects.
, Page |4
Computation is treated as the evaluation of mathematical
functions.
Question 6. What is the stored program concept (von Neumann
machine)?
A) A program is stored on a disk and loaded into memory when
needed
B) A program is a sequence of instructions stored in memory,
and the CPU interprets the program in the specified order
C) A program is compiled before it is stored
D) A program is stored in the CPU's registers
Correct Answer: B
Rationale: The stored program concept (von Neumann
machine) is one of the most fundamental concepts in computer
science. A program is a sequence of instructions stored in
memory, and the CPU interprets the program in the specified
order.
Question 7. What programming paradigm most closely follows
the stored program concept?
A) Functional
B) Logic
C) Imperative
D) Declarative
Correct Answer: C) Imperative
Rationale: The imperative programming paradigm most closely
ASU CSE 240 Midterm Exam: Comprehensive Practice Original Question
Bank (2026–2027) Comprehensive Practice Bank — Introduction to
Programming Languages C and C++ Syntax, Pointers, Memory Management,
and Programming Language Criteria
SECTION 1: PROGRAMMING LANGUAGE FUNDAMENTALS &
PARADIGMS
Question 1. What is the primary characteristic that
distinguishes the imperative programming paradigm from the
functional programming paradigm?
A) Imperative programming uses only recursion; functional
programming uses only loops
B) Imperative programming focuses on how to achieve a result
through step-by-step instructions, while functional
programming focuses on what result is desired through
expression evaluation
C) Imperative programming is always faster than functional
programming
D) Functional programming cannot use variables
Correct Answer: B
Rationale: The imperative paradigm emphasizes explicit
sequences of commands that modify program state, reflecting
the von Neumann architecture. The functional paradigm treats
, Page |2
computation as the evaluation of mathematical functions,
avoiding mutable state and side effects.
Question 2. What programming paradigm does Fortran belong
to?
A) Functional
B) Logic
C) Imperative
D) Object-oriented
Correct Answer: C) Imperative
Rationale: Fortran (Formula Translator) is an
imperative/procedural programming language. It was one of
the earliest high-level languages and follows the imperative
paradigm with step-by-step instructions.
Question 3. In the context of programming language design,
what does the term "orthogonality" refer to?
A) The speed at which a language compiles
B) The principle that a relatively small set of primitive
constructs can be combined in a relatively small number of
ways to build control and data structures
C) The number of keywords in a language
D) The ability to use multiple languages in one program
Correct Answer: B
Rationale: Orthogonality means that features of a language are
independent and do not interact in unexpected ways. High
, Page |3
orthogonality generally simplifies language learning and use,
but excessive orthogonality can lead to complexity.
Question 4. Which of the following orthogonality principles
describes this example: "If a block allows one statement, it
should allow zero or more statements within that same block"?
A) Number orthogonality
B) Type orthogonality
C) Scope orthogonality
D) Control orthogonality
Correct Answer: A) Number orthogonality
Rationale: Number orthogonality refers to the principle that a
language construct should work with any number of elements,
including zero, one, or many. If a block allows one statement, it
should also allow zero or more statements.
Question 5. What computing paradigm enforces stateless (no
side-effects) programming?
A) Imperative
B) Object-oriented
C) Functional
D) Procedural
Correct Answer: C) Functional
Rationale: Functional programming enforces stateless
programming by avoiding mutable state and side effects.
, Page |4
Computation is treated as the evaluation of mathematical
functions.
Question 6. What is the stored program concept (von Neumann
machine)?
A) A program is stored on a disk and loaded into memory when
needed
B) A program is a sequence of instructions stored in memory,
and the CPU interprets the program in the specified order
C) A program is compiled before it is stored
D) A program is stored in the CPU's registers
Correct Answer: B
Rationale: The stored program concept (von Neumann
machine) is one of the most fundamental concepts in computer
science. A program is a sequence of instructions stored in
memory, and the CPU interprets the program in the specified
order.
Question 7. What programming paradigm most closely follows
the stored program concept?
A) Functional
B) Logic
C) Imperative
D) Declarative
Correct Answer: C) Imperative
Rationale: The imperative programming paradigm most closely