

Principles of Programming Languages
Final Test Solutions
Course Introduction
Principles of Programming Languages explores the fundamental concepts that underpin the design, definition, and implementation of programming languages. The course examines various paradigms such as procedural, functional, object-oriented, and logic programming, highlighting their key features and differences. Students learn about language syntax and semantics, type systems, control structures, abstraction mechanisms, and language translation. Through comparative analysis of representative languages, the course fosters a deeper understanding of how programming languages influence software development, problem-solving strategies, and computational efficiency.
Recommended Textbook
Programming Languages Principles and Practices 3rd Edition by Kenneth C. Louden
Available Study Resources on Quizplus
13 Chapters
651 Verified Questions
651 Flashcards
Source URL: https://quizplus.com/study-set/1650

Page 2

Chapter 1: Introduction
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/32743
Sample Questions
Q1) The primary feature of an imperative language is a sequence of statements that represent commands.
A)True
B)False
Answer: True
Q2) Specification languages would allow users to indicate their requirements and would then implement those requirements.
A)True
B)False
Answer: True
Q3) The lexical structure of a programming language is similar to grammar in a natural language.
A)True
B)False
Answer: False
Q4) The ALGOL programming language provides support for recursive procedures.
A)True
B)False Answer: True
To view all questions and flashcards with answers, click on the resource link above. Page 3

Chapter 2: Language Design Criteria
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/32744
Sample Questions
Q1) The real benefit of deferring type checking until runtime is ____.
A) greater runtime efficiency
B) greater programmer efficiency
C) higher program reliability
D) higher program safety
Answer: B
Q2) The fact that Pascal does not allow functions and procedures to be assigned to variables indicates a lack of ____ in the language.
A) uniformity
B) generality
C) orthogonality
D) efficiency
Answer: B
Q3) Python was designed to bridge the gap between a systems language like C and a shell language like Perl.
A)True
B)False
Answer: True
To view all questions and flashcards with answers, click on the resource link above. Page 4

Chapter 3: Functional Programming
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/32745
Sample Questions
Q1) A function application is a call to a defined function using actual parameters.
A)True
B)False
Answer: True
Q2) Scheme expressions must be written in prefix form.
A)True
B)False Answer: True
Q3) A Scheme compiler will translate a tail recursive function into code that executes as a loop.
A)True
B)False
Answer: True
Q4) If the ML command val h::t = [4 5 6]; is executed,what value will t have?
A) [1]
B) [2]
C) [1 2]
D) [2 3]
Answer: D
To view all questions and flashcards with answers, click on the resource link above. Page 5

Chapter 4: Logic Programming
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/32746
Sample Questions
Q1) Logic programming systems are sometimes referred to as ____.
A) logic queries
B) deductive databases
C) derivative databases
D) successional databases
Q2) In predicate calculus,arguments to predicates and functions can only be termsthat is,combinations of ____.
A) predicates and connectives
B) constants and predicates
C) variables, constants, and functions
D) predicates, quantifiers, and connectives
Q3) The ____ quantifier represents all things in the universe named by the variable.
A) existential
B) universal
C) global
D) general
Q4) Automated deduction systems have difficulty handling all of first-order predicate calculus.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 6

Chapter 5: Object-Oriented Programming
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/32747
Sample Questions
Q1) In Java,scalar data types are also called ____ types.
A) primitive
B) simple
C) quantitative
D) flexible
Q2) In Java,the ____ constructor takes no parameters.
A) chained
B) overloaded
C) default
D) base
Q3) In Smalltalk,the object that receives a message performs its service by invoking an appropriate ____.
A) method
B) function
C) procedure
D) sub-routine
Q4) In Smalltalk,a message is a request for a service.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 7
Chapter 6: Syntax
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/32748
Sample Questions
Q1) The start symbol is used to identify the start of the grammar.
A)True
B)False
Q2) A ____ rule must be stated to overcome ambiguous grammars.
A) clarifying
B) disambiguating
C) specifying
D) overriding
Q3) Reserved words,or keywords,are not considered to be a typical token category.
A)True
B)False
Q4) During the ____ phase,the translator processes the tokens,determining the program's syntactic structure.
A) generation
B) parsing
C) implementation
D) scanning
Q5) Regular expressions can be used to describe tokens.
A)True
B)False

Page 8
To view all questions and flashcards with answers, click on the resource link above.

Chapter 7: Basic Semantics
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/32749
Sample Questions
Q1) Names can be bound to attributes prior to translation time,as in the case of predefined identifiers.
A)True
B)False
Q2) If an operator can be used to perform more than one operation,it is said to be shadowed.
A)True
B)False
Q3) Language systems that automatically reclaim garbage are said to perform ____.
A) memory reallocation
B) memory reclamation
C) recycling
D) garbage collection
Q4) In a block-structured language with heap allocation,there are three kinds of allocation: static (for global variables),automatic (for local variables),and dynamic (for heap allocation).
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 9

Chapter 8: Data Types
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/32750
Sample Questions
Q1) Pointers are often used in the creation of recursive types.
A)True
B)False
Q2) To create a new data type that contains a subset of a known data type,the ____ mechanism is used.
A) subtype
B) anonymous union
C) intersection
D) product
Q3) Implicit conversions are often referred to as ____.
A) type leaps
B) symbolic conversions
C) interpretive conversions
D) coercions
Q4) In Java,types constructed using type constructors are called ____ types.
A) reference
B) simple
C) primitive
D) integral
To view all questions and flashcards with answers, click on the resource link above. Page 10
Chapter 9: Control I - Expressions and Statements
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/32751
Sample Questions
Q1) A language has referential transparency when its expressions produce no side effects.
A)True
B)False
Q2) Evaluating all operands before applying operators is called ____ evaluation.
A) normal order
B) applicative order
C) delayed
D) short-circuit
Q3) ____ evaluation stops once the truth value of a Boolean expression is known.
A) Predictive
B) Short-circuit
C) Optimized
D) Applicative order
Q4) In a case statement,no two listed cases may have the same value after conversion.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above.

11

Chapter 10: Control II - Procedures and Environments
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/32752
Sample Questions
Q1) Pass by value implies that changes cannot occur outside the procedure through the use of parameters.
A)True
B)False
Q2) In Ada,parameters can be declared as in or out,but not both.
A)True
B)False
Q3) You call a procedure by stating its name,together with arguments to the call.
A)True
B)False
Q4) A call to a procedure transfers control to the beginning of the body of the called procedure.
A)True
B)False
Q5) The access link provides access to ____.
A) local variables
B) nonlocal variables
C) parameters
D) imported variables
To view all questions and flashcards with answers, click on the resource link above. Page 12

Chapter 11: Abstract Data Types and Modules
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/32753
Sample Questions
Q1) The namespace-like mechanism in Java is the ____.
A) module
B) namespace
C) import
D) package
Q2) An existential type of an abstract data type asserts the existence of an actual type that meets its requirements.
A)True
B)False
Q3) A(n)____ is a set of values,along with certain operations on those values.
A) expression
B) data type
C) variable
D) class
Q4) Predicates and selectors are subtypes of constructors.
A)True
B)False
Q5) The use of namespaces is explicitly tied to separate compilation.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 13

Chapter 12: Formal Semantics
Available Study Resources on Quizplus for this Chatper
50 Verified Questions
50 Flashcards
Source URL: https://quizplus.com/quiz/32754
Sample Questions
Q1) ____ semantics uses mathematical logic to define a language.
A) Axiomatic
B) Denotational
C) Operational
D) Logical
Q2) Formal specifications written in the operational or denotational style can be translated relatively easily into languages suitable for prototyping,such as Prolog.
A)True
B)False
Q3) Values of semantic functions in denotational descriptions will often be functions themselves.
A)True
B)False
Q4) The value of a semantic function is specified by giving a semantic ____ corresponding to each grammar rule.
A) range
B) definition
C) value
D) equation
To view all questions and flashcards with answers, click on the resource link above. Page 14

Chapter 13: Parallel Programming
Available Study Resources on Quizplus for this Chatper
51 Verified Questions
51 Flashcards
Source URL: https://quizplus.com/quiz/32755
Sample Questions
Q1) A ____ executes a particular sequence of instructions independently,while sharing all memory and other resources with its parent program.
A) thread
B) shared process
C) job
D) batch
Q2) An example of the ____ model is where a process creates several child processes,each with its own code,and then waits for the children to complete their execution.
A) fork-join
B) SIMD
C) MIMD
D) distributed memory
Q3) When multiple processes share a single processor,it is a form of ____.
A) parallelism
B) pseudoparallelism
C) multiprocessing
D) synchronized processing
To view all questions and flashcards with answers, click on the resource link above. Page 15