16.01 Data Types With Questions And
Answers
Built-in data types - Answer -the programming language defines the range of possible values that
can be assigned to a variable when its type has been chosen.
the programming language defines the operations that are available for manipulating values
assigned to the variable.
Built-in data types eg - Answer -char, string
User-defined definition - Answer -a data type based on an existing data type or other data types
that have been defined by a programmer
User-defined other - Answer -when writing a program, a programmer becomes a 'user' of a
programming language.
not built-in
can only be used if programming language offers support for construct
User-defined eg - Answer -record
Non-composite data types defintiton - Answer -a data type defined which does not involve a
reference to another data type.
Non-composite data types other - Answer -can be a user-defined data type
can be primitive type available in a programming language
Non-composite data types eg - Answer -integer, real
Enumerated data types defintion - Answer -a non-composite user-defined data type for which
the definition identifies all possible values and has an implied order
Enumerated data types other - Answer -can assign values to
non-composite but is user defined
finite
must not be enclosed in quotes (not a string)
the values defined in an enumerated data type are ordinal. This means that enumerated data types
have an implied order of values
There could not be a built-in generic definition of an enumerated data type because the possible
values would not be known.
enumerated data type definition defining data type - Answer -//pseudocode
//defining data type
TYPE
TDirections = (North, East, South, West)
ENDTYPE
Answers
Built-in data types - Answer -the programming language defines the range of possible values that
can be assigned to a variable when its type has been chosen.
the programming language defines the operations that are available for manipulating values
assigned to the variable.
Built-in data types eg - Answer -char, string
User-defined definition - Answer -a data type based on an existing data type or other data types
that have been defined by a programmer
User-defined other - Answer -when writing a program, a programmer becomes a 'user' of a
programming language.
not built-in
can only be used if programming language offers support for construct
User-defined eg - Answer -record
Non-composite data types defintiton - Answer -a data type defined which does not involve a
reference to another data type.
Non-composite data types other - Answer -can be a user-defined data type
can be primitive type available in a programming language
Non-composite data types eg - Answer -integer, real
Enumerated data types defintion - Answer -a non-composite user-defined data type for which
the definition identifies all possible values and has an implied order
Enumerated data types other - Answer -can assign values to
non-composite but is user defined
finite
must not be enclosed in quotes (not a string)
the values defined in an enumerated data type are ordinal. This means that enumerated data types
have an implied order of values
There could not be a built-in generic definition of an enumerated data type because the possible
values would not be known.
enumerated data type definition defining data type - Answer -//pseudocode
//defining data type
TYPE
TDirections = (North, East, South, West)
ENDTYPE