Deck 8: Data Types
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
Play
Full screen (f)
Deck 8: Data Types
1
All data types must be named.
False
2
Ada has a completely safe union mechanism,called a variant record.
True
3
Ada is a language with no explicit types.
False
4
Subset types inherit operations from their parent types.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
Enumerated types are never ordered.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
Java does not allow dynamically sized arrays.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
All computer data is finite.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
Every language comes with a set of predefined types from which all other types are constructed.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
In Ada,simple data types are called scalar types.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
A union is considered to be discriminated if a tag is added to the union to distinguish the type of the element.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
Polymorphism allows names to have multiple types but does not allow for static type checking.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
Static type information allows compilers to allocate memory efficiently.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
For multidimensional arrays,the column-major form of allocation can be used only if all array indices must be specified together.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
In a strongly typed programming language,the set of legal programs is a proper subset of the set of safe programs.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
Pointers are often used in the creation of recursive types.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
Explicit typing can be used to remove ambiguities in programs.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
In C,types that are constructed using type constructors are called derived types.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
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.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
In C/C++,multidimensional array declarations must have all but the first dimension specified.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
The type system is the naming convention for data types.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
In Java,types constructed using type constructors are called ____ types.
A) reference
B) simple
C) primitive
D) integral
A) reference
B) simple
C) primitive
D) integral
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
Casts are permitted on structured types if they have identical sizes in memory.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
Each type descriptor includes a field called a type form to identify the category of the data type.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
The process a translator goes through to determine whether the type information in a program is consistent is called type ____.
A) inference
B) constructing
C) equivalence
D) checking
A) inference
B) constructing
C) equivalence
D) checking
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
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
A) subtype
B) anonymous union
C) intersection
D) product
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
A narrowing conversion is an implicit conversion that may result in loss of data.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
A data type is a(n)____.
A) encoding form
B) set of values
C) style of storage
D) group of locations in memory
A) encoding form
B) set of values
C) style of storage
D) group of locations in memory
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
Type ____ algorithms determine if two separately declared types are the same.
A) inference
B) equivalence
C) comparison
D) enforcing
A) inference
B) equivalence
C) comparison
D) enforcing
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
____ types have no name.
A) Generic
B) Anonymous
C) Variable
D) User-defined
A) Generic
B) Anonymous
C) Variable
D) User-defined
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
Type ____ are used to construct complex types from basic types.
A) constructors
B) assemblers
C) checkers
D) combiners
A) constructors
B) assemblers
C) checkers
D) combiners
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
Static type checking occurs at runtime.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
____ types are sets whose elements are named and listed explicitly.
A) List
B) Array
C) Enumerated
D) Simple
A) List
B) Array
C) Enumerated
D) Simple
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
In C,the Cartesian product type constructor is available as the ____ construction.
A) structure
B) set
C) array
D) enumerator
A) structure
B) set
C) array
D) enumerator
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
Type declaration is the process of ____.
A) inferring new data types
B) creating type constructors
C) naming new data types
D) associating data types to identifiers
A) inferring new data types
B) creating type constructors
C) naming new data types
D) associating data types to identifiers
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
Hindley-Milner type checking assigns type variables to all unnamed types.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
The process of attaching types to expressions is called type ____.
A) construction
B) inference
C) equivalence
D) checking
A) construction
B) inference
C) equivalence
D) checking
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
Languages without static type systems are usually called ____ languages.
A) reverse typed
B) untyped
C) weakly typed
D) strongly typed
A) reverse typed
B) untyped
C) weakly typed
D) strongly typed
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
To obtain the value of a location in memory referenced by a pointer,the pointer must be ____.
A) dereferenced
B) linked
C) evaluated
D) retrieved
A) dereferenced
B) linked
C) evaluated
D) retrieved
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
A(n)____ type uses itself in its declaration.
A) bootstrap
B) recursive
C) reference
D) enumerated
A) bootstrap
B) recursive
C) reference
D) enumerated
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
Which of the following languages has no explicit types or translation-time typing?
A) Ada
B) Java
C) C++
D) Scheme
A) Ada
B) Java
C) C++
D) Scheme
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
Ordinal data types in Ada are called ____ types.
A) simple
B) scalar
C) composite
D) discrete
A) simple
B) scalar
C) composite
D) discrete
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
If a type must be inferred by the translator,it is considered to be a(n)____ type.
A) explicit
B) strong
C) implicit
D) weak
A) explicit
B) strong
C) implicit
D) weak
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
If information is maintained and checked at runtime,the checking is ____.
A) dynamic
B) static
C) referential
D) inferential
A) dynamic
B) static
C) referential
D) inferential
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
The primary data structure used to represent type attributes is called a type ____.
A) definer
B) descriptor
C) constructor
D) enumerator
A) definer
B) descriptor
C) constructor
D) enumerator
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
Implicit conversions are often referred to as ____.
A) type leaps
B) symbolic conversions
C) interpretive conversions
D) coercions
A) type leaps
B) symbolic conversions
C) interpretive conversions
D) coercions
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
Explicit conversions are often referred to as ____.
A) casts
B) coercions
C) narrowing conversions
D) widening conversions
A) casts
B) coercions
C) narrowing conversions
D) widening conversions
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
When a structured type is cast,the translation merely ____ the memory as a different type.
A) reallocates
B) references
C) reinterprets
D) realigns
A) reallocates
B) references
C) reinterprets
D) realigns
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
____ is a term used for the type correctness of assignments.
A) Assignment linking
B) Value assignment
C) Assignment compatibility
D) Backwards compatibility
A) Assignment linking
B) Value assignment
C) Assignment compatibility
D) Backwards compatibility
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
____ equivalence in type checking is when two objects are built in the same way using the same type constructors from the same simple types.
A) Referential
B) Simple
C) Constructor
D) Structural
A) Referential
B) Simple
C) Constructor
D) Structural
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
The most general type possible for a polymorphic function with a given implementation is called its ____ type.
A) general
B) base
C) principal
D) specialized
A) general
B) base
C) principal
D) specialized
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck