Skip to main content

Survey of Programming Languages Mock Exam - 651 Verified Questions

Page 1


Survey of Programming Languages

Mock Exam

Course Introduction

This course provides an overview of programming languages, exploring their history, design philosophies, and practical usage. Students will examine the major paradigms procedural, object-oriented, functional, and logic programming by reviewing representative languages such as C, Java, Python, Haskell, and Prolog. The course focuses on comparing syntax, semantics, data structures, and control structures, as well as considering factors like readability, maintainability, and efficiency. Emphasis is placed on understanding how language choice influences software development and problem-solving approaches, preparing students for further study and adaptation in a rapidly changing technological landscape.

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) Lisp is based on the ____ model of computation.

A) functional

B) imperative

C) semantic

D) interpretive

Answer: A

Q2) The primary feature of an imperative language is a sequence of statements that represent commands.

A)True

B)False Answer: True

Q3) An abstraction is a way of expressing ideas that make them concise,simple,and easy for the human mind to grasp.

A)True

B)False

Answer: True

Q4) Machine code was considered to be the first software.

A)True

B)False Answer: True

Page 3

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

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) Which of the following is most closely related to reliability?

A) Generality

B) Regularity

C) Security

D) Uniformity

Answer: C

Q2) The irregularities of primitive types and reference types in Java is the result of the designer's concern with ____.

A) efficiency

B) orthogonality

C) regularity

D) generality

Answer: A

Q3) FORTRAN's designers attempted to improve the readability of programs by making the constructs look like ordinary written English.

A)True

B)False

Answer: False

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) Which of the following statements about Scheme is correct?

A) Scheme function applications use pass by value, while special forms in Scheme use delayed evaluation.

B) Scheme function applications use pass by name, while special forms in Scheme use delayed evaluation.

C) Scheme special forms use pass by value, while function applications in Scheme use delayed evaluation.

D) Scheme special forms use pass by value, while function applications in Scheme use delayed evaluation

Answer: A

Q2) The semantics of Scheme uses static type checking.

A)True

B)False

Answer: False

Q3) The ML programming language has a built-in list reverse function called rev. 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) The statements a b and b c then a c are an example of a typical inference rule.

A)True

B)False

Q3) In the Horn clause a and a and a b,the variable b is called the ____.

A) head

B) body

C) tail

D) fact

Q4) Logical statements can be either true or false.

A)True

B)False

Q5) The process of unification can be used to shorten clauses.

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) ____ is an important need satisfied by object-oriented programming.

A) Rapid prototyping

B) Program component dependence

C) Abstract data typing

D) Independence of software components

Q2) The history of object-oriented programming languages begins in the 1960s with the Simula project.

A)True

B)False

Q3) To avoid repeated inheritance,one must ____.

A) declare the inheritance using the virtual keyword

B) declare the inheritance using the shared keyword

C) use a private inner class

D) use an inherited function

Q4) C++ member functions that are given implementations in a class declaration are automatically assumed to be inline.

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) ____ languages require all tokens to occur in prespecified locations on the page.

A) Free-format

B) Precise-format

C) Fixed-format

D) Specified-format

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

A) Distinguishers

B) Identifiers

C) Metasymbols

D) Abstract characters

Q3) A context-free grammar consists of a series of ____.

A) grammar rules

B) positional rules

C) semantic rules

D) algebraic expressions

Q4) Reserved words,or keywords,are not considered to be a typical token category.

A)True

B)False

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) Garbage is defined as ____.

A) a collection of unused constants

B) a collection of unused variables

C) variables with duplicate values

D) memory that has been allocated in the environment but that has become inaccessible to the program

Q2) Java uses assignment by cloning for all object variables.

A)True

B)False

Q3) The ____ is the level number and offset of a declared name.

A) lexical address

B) block address

C) compound address

D) explicit address

Q4) Binding time refers to when an attribute is computed and bound to a name.

A)True

B)False

Q5) The lifetime of an object is the duration of its allocation in the environment.

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) Type ____ algorithms determine if two separately declared types are the same.

A) inference

B) equivalence

C) comparison

D) enforcing

Q2) Each type descriptor includes a field called a type form to identify the category of the data type.

A)True

B)False

Q3) Static type checking occurs at runtime.

A)True

B)False

Q4) A union is considered to be discriminated if a tag is added to the union to distinguish the type of the element.

A)True

B)False

Q5) Ada is a language with no explicit types.

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) Lisp requires all expressions to be fully parenthesized.

A)True

B)False

Q2) Alan Turing introduced the guarded if statement.

A)True

B)False

Q3) If control resumes at the point where the exception was first raised,the ____ model is being used.

A) resumption

B) redemption

C) termination

D) recovery

Q4) The most closely nested rule is used to disambiguate ____.

A) nonlocal variable references

B) parameter references

C) if statements

D) function calls

Q5) To exit a loop completely,the continue statement is used.

A)True

B)False

To view all questions and flashcards with answers, click on the resource link above. Page 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) Another name for activation record is stack record.

A)True

B)False

Q2) Historically,the interpretation of pass by name arguments as functions to be evaluated was expressed by referring to them as ____.

A) chunks

B) objects

C) thunks

D) expressions

Q3) A procedure communicates with its calling environment through ____.

A) parameters

B) local variables

C) constants

D) shared memory

Q4) ____ are known as actual parameters.

A) Arguments

B) Global variables

C) Control statements

D) Normal parameters

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) In a language-independent specification of a data type in which the signature depends on another type,we say that it ____ the other type.

A) loads

B) imports

C) borrows from

D) inherits

Q2) In the example of a complex number data type presented in the textbook,the properties of the complex data type can be ____ from those of the real data type by stating properties of the operations.

A) inferred

B) implied

C) derived

D) assumed

Q3) A set and operations that meet the algebraic specification of an abstract data type are a(n)____ for the specification.

A) example

B) model

C) prototype

D) abstract

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) The weakest precondition of a series of statements is the composition of the weakest preconditions of its parts.

A)True

B)False

Q2) Assertions about the situation just before execution are called ____.

A) preconditions

B) postconditions

C) executable assertions

D) requirements

Q3) A(n)____ specification allows us to construct a language interpreter directly from a formal specification.

A) abstract

B) executable

C) reduction

D) inference

Q4) In the sample small language presented in Chapter 12,the sets Program and Expression is an example of a syntactic domain.

A)True

B)False

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) Threads can be an efficient mechanism for coarse-grained parallelism in the shared memory model.

A)True

B)False

Q2) The idea of parallel processing has only been around since the 1980s.

A)True

B)False

Q3) Java threads exhibit fork-join parallelism.

A)True

B)False

Q4) 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

Q5) Program-level parallelism provides fine-grained control over processes.

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
Survey of Programming Languages Mock Exam - 651 Verified Questions by Quizplus - Issuu