TCSS 380 TRUE/FALSE
A jagged array is a multidimensioned array in which the lengths of the rows must be the same
False
All subclasses are subtypes
False
Procedures are collections of statements that define parameterized computations that return values
False
The most common numeric data type is string
False
There are three distinct categories of subprograms.
False
Binding is an association between an attirbute and an entity
True
Boolean expressions consist of Boolean variables, Boolean constants, relational expressions, and Boolean operators.
True
Formal parameters are found in the header of a subprogram.
True
Functions are collections of statements that define parameterized computations that return values.
True
In many languages, such as C and Java, all of the elements of an array are required to be of the same type
True
Java Threads: Java's threads run in the same address space.
True
Java Threads: When a method is declared as synchronized, it must fully complete its execution before any other synchronized method can run on that object.
True
Languages that allow mixed-mode expressions can contain operators that can have operands of different types.
True
Languages that use the end reserved word are less ambiguous when it comes to nested if statements.
True
Most computers use twos complement to represent negative integers
True
Most of the characteristics of arithmetic expressions in programming languages were inherited from the mathematics and its concept of placing operators in a hierarchy of evaluation priorities
True
Polymorphism can be achieved by binding messages to method references dynamically at runtime.
True
Positional parameters bind the actual parameters to the formal parameters by position.
True
Programmers can alter the order of evaluation within expressions by placing parentheses in expressions.
True
Ruby and Smalltalk are pure object-oriented languages in that virtually everything in the language is an object.
True
Ruby's case statement is similar to other languages' else-if multiple-selection structure.
True
Some programming languages support a complex data type
True
Subclass B that is a subtype of a parent class A can have members that are not in the parent class
True
Syntax of imperative languages is much more complex than syntax of functional languages
True
The associativity rules of the language determine which operator is evaluated first when two operators share the same level of precedence.
True
The time at which a binding takes place is called binding time
True
All nonstatic variables that can be nonlocally accessed are in existing activation record instances and therefore are somewhere on the heap
False
All of the logical operators of Ruby, Perl, ML, F# and C-based languages are short-circuit evaluated.
False
All subtypes are subclasses
False
An average imperative program executes in about twice the time of its functional counterpart
False
An instance of an abstract data type is called encapsulation
False
Any variable in a program is characterized by two attributes only: its type and its value
False
Before the IEEE 754 standard, programs that used floating-point types were NOT portable among various hardware architectures
False
C uses structure type equivalence for struct, enum, and union, and name equivalence for all other non-primitive types
False
C, C++, C#, and Java allow subprograms to be called indirectly by defining a pointer to the subprogram.
False
C-based languages follow the mathematics of Boolean algebra and give the AND and OR operators equal precedence.
False
Case expressions are more appropriate for Boolean-based selections rather than for ordinal type selections
False
Computers that have multiple processors that operate independently but whose operations can be synchronized are called SIMD computers.
False
Converting an int to a float is an example of a narrowing conversion in Java.
False
Data types that are defined in terms of other types are called primitive data types
False
Deadlock occurs when one task produces some data value or resource and another uses it.
False
Dynamic Type Binding: Dynamic type binding makes a program more reliable
False
Dynamic Type Binding: Dynamic type binding provides less programming flexibility
False
Dynamic Type Binding: In dynamic type binding, the name and the type of a variable are considered one unbreakable unit
False
Every object of a class has its own set of class variables, which store the object's state
False
Floating-point data types store fixed number of decimal digits represented as bytes and the implied fixed decimal point position
False
For a multiple selector, Scheme uses an operator called COND based on mathematical conditional expressions.
False
Functional languages bind values to names with side effects
False
Functional languages use more control statements than imperative languages
False
Functions and procedures are considered process abstractions because they are NOT used in object-oriented languages.
False
Imperative languages are better for concurrency because their functions are independent of context and they do not create side effects
False
Imperative programs are about 25 percent as large as functional solutions to the same problems
False
Implicit (automatic) type conversion is called typecasting
False
In C-based languages a programmer must use explicit casts to carry out mixed-mode expressions.
False
In C-based languages, the assignment operator can be used as an expression but NOT as an operand in other expressions.
False
In all languages, multiple-selection statements may have many selection clauses but only one may be selected.
False
In all languages, the scope of a local variable starts at its declaration and ends where the block ends
False
In language design, the idea of process abstraction emerged because data abstraction could not exist without process abstraction
False
In multiple inheritance, the diamond problem refers to a situation when both parent classes contain at least one method with the same name
False
In static-scoped languages the return address is used to provide traceback information when a run-time error occurs.
False
In the textbook, the word object is used for the value of a variable and the space it occupies, regardless of the variable's type
False
Information Hiding: Getters and setters are no better than making the internal data public
False
Information Hiding: It improves usability because client code can manipulate internal data directly
False
Java Threads: The Thread class is the only way to start a concurrent task in Java.
False
Java Threads: With the exception of the main method, all Java application programs run in threads.
False
Language designers have two design issues to consider when developing control structures: should they have multiple entries and should they have multiple exits.
False
Languages with no type conversions are less reliable than those that support it
False
Many contemporary languages, such as C, perform subscript range checking
False
Mathematical functions have no side effects but depend on external values such as global variables or constants
False
Methods are NOT considered process abstraction because they are used in object-oriented languages
False
Most integer types are NOT supported directly by hardware
False
Most programming languages provide a lot of array operation support, such as the ability to compare array contents, regardless of their level of nesting, and vector and matrix operands
False
Name type equivalence means that two types are equivalent if their types have identical structures
False
One of the fundamental characteristics of programs written in functional languages is that they have state, represented by program variables, which changes throughout the execution process
False
One simple factor that strongly affects the complexity of functional programming, is the necessary attention of the programmer to the state of the program at each step of its development
False
Python allows conditional targets on assignment statements.
False
Python supports character data type as a primitive type that uses ASCII numeric coding
False
Range is the accuracy of of the fractional part of a value, measured as the number of bits
False
Set theory, considered the practical branch of type theory, can be used as a perfect universal model for all data types in programming languages
False
Smalltalk, Ruby, and Java all allow only dynamic method binding.
False
Some languages use parentheses to identify control expressions, while other languages use the reserved word else.
False
Static scope is based on the calling sequence of subprograms, not on their spatial relationship to each other
False
Tasks are similar to subprograms because they have to be explicitly started (called) and because they must return control to the unit that started them.
False
Tasks that are ready to run are stored in a queue called the scheduler.
False
The abstract branch of type theory is concerned with data types in commercial programming languages
False
The essence of imperative languages is the dominant role of an assignment statement that does NOT have a side effect
False
The first task of a linker is to set the target addresses of all subprogram calls in the main program to the entry addresses of those subprograms.
False
The most widely used Single-Instruction Multiple-Data architecture computers are a category of machines called multiprocessors.
False
The operator precedence rules for expression evaluation fully define the order in which the operators of different precedence level are evaluated.
False
When a language implements subprograms as first-class objects, they may not be passed as parameters or returned from functions.
False
A compatible type is one that either is legal for the operator or is allowed under language rules to be implicitly converted by the system
True
A concurrent algorithm is scalable if the speed of its execution increases when more processors are available.
True
A data type defines a collection of data values and a set of predefined operations on those values
True
A descriptor is the collection of variable attributes that are typcially stored in a symbol table
True
A mathematical function is a mapping of members of one set, called the domain set, to another set, called the range set
True
A program variable is an abstraction of a computer memory cell or their collection
True
A race condition may occur when two tasks operate on a shared data structure at exactly the same time.
True
A run-time system program called a scheduler manages the sharing of processors among tasks.
True
A semaphore that requires only a binary-valued counter is called a binary semaphore.
True
A task is a unit of a program that can be in concurrent execution with other units of the same program.
True
A task is blocked if it is active but its execution has been interrupted.
True
A tuple is a data type that is similar to a record, except that the elements are not named, for example in Python and F# they are used to allow functions to return multiple values
True
A union is a type of a record in which the same address is used for every union field resulting in union variables storing different type values at different times during the program execution
True
A variable created outside of any program block is called a global variable
True
A widening conversion converts a value to a type that can include at least approximations of all of the values of the original types.
True
Actual parameters are found in a subprogram call statement.
True
An abstract data type is an enclosure that includes data representation for a type and the subprograms that provide operations for that type
True
An abstraction is a view or representation of an entity that includes only its most significant attributes
True
An array is an aggregate of data elements in which an individual element is identified by its position, relative to the first element
True
An associative array is an unordered collection of data elements indexed by keys, for example supported in Java by map-related libraries
True
An expression in which the result is determined without evaluating all of the operands and/or operators is called a short-circuit evaluation.
True
Arrays are sometimes called finite mappings, symbolically shown as: array_name(subscript_value_list) -> element
True
Both C and Java provide pretest and postest loop constructs.
True
C does NOT provide complete support for abstract data types but they can be simulated
True
C# uses delegates when allowing subprograms to be called indirectly.
True
C#'s switch statement requires every branch to end with an unconditional branch statement.
True
C++ is the only language discussed that uses multiple implementations (static, stack dynamic, heap dynamic) for allocation and deallocation of objects.
True
C-based languages only allow for constant expressions in their multiple selector.
True
Class B is considered a subtype of class A if: B is derived from A; B has everything A has; the behavior of objects of type B when used in place of an object of class A is identical
True
Class B that is not a subclass of class A can be a subtype of class A
True
Closures are nested collections of statements that define parameterized computations and their referencing environment.
True
Compound-assignment operators provide a shorter syntax for assigning the result of an arithmetic operation that uses a binary operator.
True
Depending on the semaphore counter value, a newly arriving task is either allowed to carry its operation or it is put in a waiting queue.
True
Dynamic Type Binding: In recent years, there has been a significant shift to languages that use dynamic type binding
True
Expressions are the fundamental means of specifying computation in a programming language
True
Floating-point data types model real numbers, represented as fractions and exponents
True
In most C-based languages, a static semantic rule is used to determine which else clause is connected to a then clause by matching the else clause with the nearest previous unpaired then clause.
True
In programming languages, arithmetic expressions consist of operators, operands, parentheses, and function calls.
True
Information Hiding: It allows internal implementation changes without affecting client code
True
Information Hiding: It improves reliability because objects can only be changed through the provided operations
True
Information Hiding: It reduces the range of code and number of variables a programmer must be aware of
True
It has been proven that all algorithms that can be expressed by flowcharts can be coded with a language with only two control statements: selection and iteration
True
Jagged arrays are possible when multidimensioned arrays are actually arrays of arrays
True
Java Threads: Java provides syntactical support for both semaphores and locks.
True
Keyword parameters bind the actual parameters to the formal parameters by specifying the name of the formal parameter in the actual parameter call.
True
Languages like Java and C# use primitive types for efficiency.
True
Multidimensioned arrays stored in row major order map multiple dimensions onto the single-dimensioned memory row by row
True
Multiple-selection statements are equivalent to n-way selection statements.
True
One of the fundamental characteristics of mathematical functions is that the evaluation order of their mapping expressions is controlled by recursion and conditional expressions
True
One of the primary motivations for nesting class definitions is information hiding
True
Semaphores create an unsafe programming environment when providing cooperation synchronization.
True
Signed integers are represented in a computer by a string of bits, with one of the bits representing a sign
True
Some early programming languages only had numeric primitive data types
True
Some languages such as Ruby allow subprograms to return more than one value.
True
Sometimes lifetime and scope do NOT exactly overlap since a variable may be live but NOT visible in a particular program unit
True
Strong typing means that type errors are always detected so that all misuses of variables are always detected
True
The dynamic chain represents the dynamic history of how execution got to its current position.
True
The high degree of similarity among the imperative languages arises in part from their heavy reliance on the underlying architecture
True
The loss of error detection is the primary reason for NOT using numeric types for Boolean operands.
True
The most important design issues for language support for concurrency are competition and cooperation synchronization.
True
The term dynamic dispatch refers to dynamic binding of method calls to metod definitions
True
The treatment of the assignment operator as any other binary operator is contrary to how an equal sign is treated in algebraic mathematical expressions
True
The two fundamental kinds of abstractions in contemporary programming languages are process abstraction and data abstraction
True
The type of the subscript is often integer and some languages support negative subscript values
True
Two types are equivalent if an operand of one type in an expression is substituted for one of the other type, without coercion
True
Type checking is the activity of ensuring that the operands of an operator are of compatible types or that formal and actual parameters are of compatible types
True
Type coercion in arithmetic expressions reduces the benefits of type checking and may lead to a loss of precision.
True
Unary assignment operators combine increment and decrement operations with assignment
True
Variables in functional languages are like named constants in imperative languages
True
Abstract method declaration includes both a method header and a method body
False
All languages use braces as a syntactic structure to form compound statements in the then and else clauses.
False
A record is an aggregate of data elements, called fields, that must be of the same type and are typically accessed using a dot notation rather than an index
False
A slice of an array is a mechanism for referencing part of an array as a new data type
False
A variable is non-local if it is visible inside a program unit or block and it is declared there
False