Subscript Binding and Array Categories Quiz
30 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

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.

True

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.

<p>True</p> Signup and view all the answers

Floating point types in languages for scientific use are usually exactly like the hardware.

<p>False</p> Signup and view all the answers

True or false: COBOL is a language that allows for dynamic string length options.

<p>False</p> 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.

<p>True</p> Signup and view all the answers

True or false: Enumeration constants are allowed to appear in more than one type definition in C++.

<p>True</p> Signup and view all the answers

True or false: All enumeration types in Java are subclasses of the predefined class Enum.

<p>True</p> Signup and view all the answers

True or false: Array indexing in most languages is done using parentheses.

<p>False</p> 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?

<p>True</p> 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?

<p>True</p> 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?

<p>True</p> Signup and view all the answers

True or false: Descriptors for dynamic attributes must be used and maintained by the run-time system?

<p>True</p> Signup and view all the answers

True or false: An object represents an instance of a user-defined (abstract data) type?

<p>True</p> Signup and view all the answers

Subscript binding and storage allocation for heap-dynamic arrays can change any number of times during program execution.

<p>True</p> Signup and view all the answers

C and C++ arrays with the static modifier are static.

<p>True</p> Signup and view all the answers

C and C++ arrays without the static modifier are fixed stack-dynamic.

<p>True</p> Signup and view all the answers

C# and Java include a second array class called ArrayList that provides fixed heap-dynamic arrays.

<p>True</p> Signup and view all the answers

Jagged arrays have rows with varying number of elements.

<p>True</p> Signup and view all the answers

Records in C/C++ are similar to tuples in Python, ML, and F#.

<p>True</p> Signup and view all the answers

A union in C/C++ can hold multiple non-static data members at the same time.

<p>False</p> Signup and view all the answers

Accessing array elements is faster than accessing record fields.

<p>False</p> Signup and view all the answers

Pointer assignment in C++ uses an implicit dereferencing operation.

<p>False</p> Signup and view all the answers

Pointers in C/C++ are used for dynamic storage management and indirect addressing.

<p>True</p> Signup and view all the answers

A dangling pointer is a pointer that points to a heap-dynamic variable that has been deallocated.

<p>True</p> Signup and view all the answers

In the given code, arrPtr1 becomes a dangling pointer after arrPtr2 is deallocated.

<p>True</p> 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.

<p>True</p> Signup and view all the answers

In the given code, ptr1 becomes a dangling pointer after ptr2 is assigned to it.

<p>False</p> Signup and view all the answers

Garbage refers to an allocated heap-dynamic variable that is still accessible to the user program.

<p>False</p> Signup and view all the answers

More Like This

Use Quizgecko on...
Browser
Browser