Skip to main content

Comparative Programming Languages Test Bank - 651 Verified Questions

Page 1


Comparative Programming Languages Test

Bank

Course Introduction

This course explores the fundamental concepts and paradigms underlying a variety of programming languages, emphasizing their comparative features and trade-offs. Students will study languages representing procedural, object-oriented, functional, logic, and concurrent models, examining differences in syntax, semantics, data types, control structures, and execution environments. Through hands-on programming assignments and critical analysis, learners will develop an understanding of how language design influences program development, performance, and maintainability, equipping them to make informed choices when selecting or learning programming languages for diverse computational problems.

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 term ____ refers to a programming language mechanism that replaces a complex notation with a simpler notation.

A) shorthand

B) syntactic sugar

C) semantic sugar

D) API

Answer: B

Q2) A variable in a programming language is considered to be a ____.

A) basic data abstraction

B) basic control abstraction

C) structured data abstraction

D) structured control abstraction

Answer: A

Q3) ____ abstractions support information hiding.

A) Basic data

B) Structured data

C) Unit data

D) Structured control

Answer: C

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) A language achieves ____ by avoiding special cases in the use of constructs.

A) orthogonality

B) efficiency

C) generality

D) uniformity

Answer: C

Q2) C++ does not have a formal language definition.

A)True

B)False

Answer: False

Q3) C++ is an open source language that has never had a commercial release.

A)True

B)False

Answer: False

Q4) Macros can be used to improve the readability of a language.

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) Given a list L in Scheme with contents of (3 7 2 8).What will be returned if the command (cdr L)is executed?

A) (8)

B) (3)

C) (2 8)

D) (7 2 8)

Answer: D

Q2) The ML programming language has a built-in list reverse function called rev.

A)True

B)False Answer: True

Q3) Lists that obey lazy evaluation are called serialized lists.

A)True

B)False

Answer: False

Q4) The simplest unit of syntax in Scheme is called an atom.

A)True

B)False Answer: True

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) In Prolog,you can specify the head and tail of a list using a backslash.

A)True

B)False

Q2) To force evaluation of an arithmetic term in Prolog,you must use the built-in predicate ____.

A) force

B) evaluate

C) equals

D) is

Q3) The semantics of programming language constructs is called ____.

A) logic statements

B) axiomatic semantics

C) syntax

D) specifications

Q4) Nonmonotonic reasoning is that adding information to a system can ____.

A) decrease the complexity

B) alter the previous information

C) change the order of execution

D) reduce the number of things that can be proved

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) A function is considered to be ____ if a compiler may replace the function call by the actual code for the function.

A) inline

B) substitutable

C) redirectable

D) virtual

Q2) In C++,instance variables and methods are both called descriptors.

A)True

B)False

Q3) ____ is the use of the same names for messages requesting similar services from different classes.

A) Polymorphism

B) Overshadowing

C) Distinction

D) Generalization

Q4) In Java,scalar data types are also called ____ types.

A) primitive

B) simple

C) quantitative

D) flexible

Page 7

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

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) Shift-reduce parsers shift tokens onto a stack before reducing strings to nonterminals.

A)True

B)False

Q2) Which of the following is not considered to be a token category?

A) reserved word

B) identifier

C) literal

D) white space

Q3) Predictive parsing allows tokens that begin optional parts of the syntax to also appear after the optional part.

A)True

B)False

Q4) ____ are symbols used to distinguish between parts of a rule.

A) Distinguishers

B) Identifiers

C) Metasymbols

D) Abstract characters

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

Page 8

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) ____ declarations are associated with a specific block.

A) Global

B) Specific

C) Local

D) General

Q2) The scope of a binding is ____.

A) the region over which the binding is maintained

B) the precision of the binding

C) the time when the binding takes place

D) the magnitude of the binding

Q3) Names can be bound to attributes prior to translation time,as in the case of predefined identifiers.

A)True

B)False

Q4) Declaration visibility includes only those regions of a program where the bindings of the declaration apply.

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) Enumerated types are never ordered.

A)True

B)False

Q2) Ada has a completely safe union mechanism,called a variant record.

A)True

B)False

Q3) Which of the following languages has no explicit types or translation-time typing?

A) Ada

B) Java

C) C++

D) Scheme

Q4) All data types must be named.

A)True

B)False

Q5) A reference is the address of an object under control of the system,which cannot be used as a value or operated on in any way.

A)True

B)False

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) Evaluating all operands before applying operators is called ____ evaluation.

A) normal order

B) applicative order

C) delayed

D) short-circuit

Q2) Sequence operators are used to ____.

A) define a set of variables to declare

B) eliminate side effects

C) allow several expressions to be combined into a single expression and evaluated sequentially

D) specify the execution order of code blocks

Q3) ____ code is code for a function body that is inserted directly at the point where the function would be called.

A) Substitution

B) Control

C) Inline

D) Parameterized

Q4) Bracketing keywords are used in the if statement to remove ambiguity.

A)True

B)False

11

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

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) A call to a procedure transfers control to the beginning of the body of the called procedure.

A)True

B)False

Q2) ____ occurs when multiple access links must be followed to arrive at a nonlocal variable.

A) Access chaining

B) Lexical chaining

C) Environmental linking

D) Global linking

Q3) The pointer to the previous activation record is the ____ link.

A) reverse

B) history

C) control

D) return

Q4) An activation record is a stored log recording each time a procedure or function is activated.

A)True B)False

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) Parameterized packages are called ____ packages in Ada.

A) flexible

B) signature

C) generic

D) incomplete

Q2) In ML,a signature is essentially the type of the ____.

A) class

B) package

C) structure

D) function

Q3) ____ is the separation of implementation details from definitions.

A) Encapsulation

B) Information hiding

C) Type checking

D) Obfuscation

Q4) Axiom ____ is the property that no axiom is implied by other axioms.

A) distinction

B) separation

C) specification

D) independence

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) A least-fixed-point solution is a solution that has been made as flexible as possible.

A)True

B)False

Q2) The Law of ____ states that nothing a programming construct can do will make false into true.

A) Monotonicity

B) Conjunction

C) Disjunction

D) the Excluded Miracle

Q3) Semantic domains are the sets in which semantic functions take their values.

A)True

B)False

Q4) The ____ is an abstract machine whose control operates directly on a program to reduce it to its semantic value.

A) definitional compiler

B) abstract evaluator

C) reduction machine

D) elimination semantics

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) Another name for the bounded buffer problem is the producer-consumer problem.

A)True

B)False

Q2) Distributed-memory systems can still be shared-memory systems.

A)True

B)False

Q3) ____ parallelism provides fine-grained control.

A) Program-level

B) Procedure-level

C) Function-level

D) Statement-level

Q4) Distributed-memory systems suffer from ____ problems.

A) synchronization

B) communication

C) interrupt

D) locking

Q5) Parallel programming is sometimes referred to as concurrent programming.

A)True

B)False

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

Turn static files into dynamic content formats.

Create a flipbook
Comparative Programming Languages Test Bank - 651 Verified Questions by Quizplus - Issuu