CSCI 316: Quiz 6 - Data Types
Sign in to Google
to save your progress.
Learn more
* Indicates required question
Email
*
Your email
Last Name
*
Your answer
First Name
*
Your answer
Student Id
*
Your answer
What is the primary purpose of data types in programming languages?
*
1 point
To enforce naming conventions
To improve execution speed
To determine variable scope
To control memory allocation only
To define the range of values and operations for entities
A primitive data type is best described as:
*
1 point
A user-defined composite structure
A dynamically allocated type
A data type with no internal structure visible to the programmer
A type implemented using pointers
A data type composed of multiple fields
Which of the following is typically considered a primitive data type?
*
1 point
Record
Array
Integer
Tuple
List
Which characteristic of integers varies across programming languages?
*
1 point
Precision and range
Scope rules
Control flow
Name binding
Parameter passing method
Which representation is most commonly used for signed integers?
*
1 point
Two’s complement
Excess-128
Gray code
ASCII
One’s complement
Floating-point values are primarily used to represent:
*
1 point
Approximate real numbers
Discrete values
Memory addresses
Logical values
Character codes
Which of the following is a disadvantage of floating-point arithmetic?
*
1 point
Limited range
High memory usage only
Rounding errors
Inability to represent integers
Lack of hardware support
What is the main design issue for Boolean data types?
*
1 point
Range of values
Storage allocation
Variable lifetime
Number of primitive operations provided
Name binding time
A character string type is best described as:
*
1 point
A record with one field
A pointer to characters
A primitive numeric type
A sequence of characters treated as a single unit
A fixed-size array only
Which string representation stores the length explicitly?
*
1 point
Linked lists of characters
Null-terminated strings
ASCII tables
Fixed-length arrays only
Descriptor-based strings
What is a key advantage of descriptor-based strings?
*
1 point
Reduced memory usage
No need for dynamic allocation
Simpler syntax
Faster character access
Constant-time length retrieval
An enumeration type is primarily used to:
*
1 point
Implement dynamic typing
Represent pointer values
Store numeric ranges
Store heterogeneous data
Define a set of named integer constants
Which is a major advantage of enumeration types?
*
1 point
Support for recursion
Elimination of type checking
Improved program readability and reliability
Reduced memory consumption
Faster arithmetic operations
An array type is defined by:
*
1 point
Heterogeneous fields
Its pointer semantics only
Enumeration values
A sequence of homogeneous elements
Dynamic binding rules
Which is a design issue for array types?
*
1 point
Indexing method
Exception handling
Scope rules
Variable lifetime
Name binding
Which array index type improves reliability?
*
1 point
Character
Boolean
Enumeration
Pointer
Floating-point
What is a row-major array layout?
*
1 point
Heap-based layout only
Columns stored contiguously
Rows stored contiguously
Dynamic memory layout
Diagonal elements stored first
Which language typically uses row-major order?
*
1 point
C and C++
Fortran
Lisp
Prolog
Ada
An associative array is indexed by:
*
1 point
Boolean values
Enumeration values only
Memory addresses
Integers only
Strings or arbitrary keys
Which language heavily relies on associative arrays?
*
1 point
Ada
Fortran
Python
Java
C
A record type is best described as:
*
1 point
A heterogeneous collection of fields
A dynamically sized array
A homogeneous collection
A pointer structure
A tuple with no names
Which language refers to records as struct?
*
1 point
Lisp
C
Java
Python
Ada
What distinguishes a tuple from a record?
*
1 point
Tuples are arrays
Tuples do not have named fields
Records require dynamic allocation
Records cannot be nested
Tuples allow heterogeneous elements
A list type typically supports:
*
1 point
Fixed size at compile time
Stack allocation only
Sequential access via links
Homogeneous fields only
Direct indexed access only
Which language family strongly supports list types?
*
1 point
Imperative languages
Functional languages
Assembly languages
Systems languages
Logic-only languages
A union type allows:
*
1 point
One of different possible types in the same location
Automatic type conversion
Multiple values stored simultaneously
Safe type checking at runtime
Dynamic resizing
What is a major disadvantage of union types?
*
1 point
Inability to store integers
Reduced execution speed
Potential type safety violations
Lack of compiler support
High memory usage
A pointer type stores:
*
1 point
An index into an array
A value directly
A memory address
A type descriptor
A record field
A reference type differs from a pointer because it:
*
1 point
Cannot be dereferenced
Stores no address
Is implicitly dereferenced
Is dynamically typed
Cannot be aliased
Optional types are primarily designed to:
*
1 point
Prevent null reference errors
Improve array indexing
Eliminate dynamic typing
Speed up execution
Replace pointers
A copy of your responses will be emailed to the address you provided.
Submit
Clear form
Never submit passwords through Google Forms.
reCAPTCHA
Privacy
Terms
This content is neither created nor endorsed by Google. -
Terms of Service
-
Privacy Policy
Does this form look suspicious?
Report
Forms
Help and feedback