Podcast
Questions and Answers
Primitive Data Types: Integer is always an exact reflection of the hardware.
Primitive Data Types: Integer is always an exact reflection of the hardware.
False
There may be as many as eight different integer types in a language.
There may be as many as eight different integer types in a language.
True
Java's signed integer sizes are byte, short, int, long.
Java's signed integer sizes are byte, short, int, long.
True
Signed integer number representations include sign-magnitude, one's complement, and two's complement.
Signed integer number representations include sign-magnitude, one's complement, and two's complement.
Signup and view all the answers
Floating point types in languages for scientific use are usually exactly like the hardware.
Floating point types in languages for scientific use are usually exactly like the hardware.
Signup and view all the answers
True or false: COBOL is a language that allows for dynamic string length options.
True or false: COBOL is a language that allows for dynamic string length options.
Signup and view all the answers
True or false: An ordinal type is a type in which the range of possible values can be easily associated with the set of positive integers.
True or false: An ordinal type is a type in which the range of possible values can be easily associated with the set of positive integers.
Signup and view all the answers
True or false: Enumeration constants are allowed to appear in more than one type definition in C++.
True or false: Enumeration constants are allowed to appear in more than one type definition in C++.
Signup and view all the answers
True or false: All enumeration types in Java are subclasses of the predefined class Enum.
True or false: All enumeration types in Java are subclasses of the predefined class Enum.
Signup and view all the answers
True or false: Array indexing in most languages is done using parentheses.
True or false: Array indexing in most languages is done using parentheses.
Signup and view all the answers
True or false: A data type defines a collection of data objects and a set of predefined operations on those objects?
True or false: A data type defines a collection of data objects and a set of predefined operations on those objects?
Signup and view all the answers
True or false: A descriptor is the collection of the attributes of a variable that are used for type checking and performing allocation and deallocation operations?
True or false: A descriptor is the collection of the attributes of a variable that are used for type checking and performing allocation and deallocation operations?
Signup and view all the answers
True or false: Descriptors for static attributes are needed only at compile-time, built as part of the symbol table?
True or false: Descriptors for static attributes are needed only at compile-time, built as part of the symbol table?
Signup and view all the answers
True or false: Descriptors for dynamic attributes must be used and maintained by the run-time system?
True or false: Descriptors for dynamic attributes must be used and maintained by the run-time system?
Signup and view all the answers
True or false: An object represents an instance of a user-defined (abstract data) type?
True or false: An object represents an instance of a user-defined (abstract data) type?
Signup and view all the answers
Subscript binding and storage allocation for heap-dynamic arrays can change any number of times during program execution.
Subscript binding and storage allocation for heap-dynamic arrays can change any number of times during program execution.
Signup and view all the answers
C and C++ arrays with the static modifier are static.
C and C++ arrays with the static modifier are static.
Signup and view all the answers
C and C++ arrays without the static modifier are fixed stack-dynamic.
C and C++ arrays without the static modifier are fixed stack-dynamic.
Signup and view all the answers
C# and Java include a second array class called ArrayList that provides fixed heap-dynamic arrays.
C# and Java include a second array class called ArrayList that provides fixed heap-dynamic arrays.
Signup and view all the answers
Jagged arrays have rows with varying number of elements.
Jagged arrays have rows with varying number of elements.
Signup and view all the answers
Records in C/C++ are similar to tuples in Python, ML, and F#.
Records in C/C++ are similar to tuples in Python, ML, and F#.
Signup and view all the answers
A union in C/C++ can hold multiple non-static data members at the same time.
A union in C/C++ can hold multiple non-static data members at the same time.
Signup and view all the answers
Accessing array elements is faster than accessing record fields.
Accessing array elements is faster than accessing record fields.
Signup and view all the answers
Pointer assignment in C++ uses an implicit dereferencing operation.
Pointer assignment in C++ uses an implicit dereferencing operation.
Signup and view all the answers
Pointers in C/C++ are used for dynamic storage management and indirect addressing.
Pointers in C/C++ are used for dynamic storage management and indirect addressing.
Signup and view all the answers
A dangling pointer is a pointer that points to a heap-dynamic variable that has been deallocated.
A dangling pointer is a pointer that points to a heap-dynamic variable that has been deallocated.
Signup and view all the answers
In the given code, arrPtr1 becomes a dangling pointer after arrPtr2 is deallocated.
In the given code, arrPtr1 becomes a dangling pointer after arrPtr2 is deallocated.
Signup and view all the answers
A lost heap-dynamic variable is an allocated heap-dynamic variable that is no longer accessible to the user program.
A lost heap-dynamic variable is an allocated heap-dynamic variable that is no longer accessible to the user program.
Signup and view all the answers
In the given code, ptr1 becomes a dangling pointer after ptr2 is assigned to it.
In the given code, ptr1 becomes a dangling pointer after ptr2 is assigned to it.
Signup and view all the answers
Garbage refers to an allocated heap-dynamic variable that is still accessible to the user program.
Garbage refers to an allocated heap-dynamic variable that is still accessible to the user program.
Signup and view all the answers