1/13
This set of vocabulary flashcards covers key concepts of C++ structures, unions, and enumerated types as presented in the Chapter 11 review questions of 'Starting Out with C++: From Control Structures through Objects, 8/e'.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Built-in Data Type
A data type that is integrated directly into the C++ language, such as int, char, or float.
Structure vs. Array (Data Types)
The elements of an array must all be of the same data type, whereas the members of a structure may be of different data types.
Structure Tag
The identifier used in a structure declaration to name the new data type.
Members
The individual data elements or variables contained within a structure or union.
Dot Operator
The operator used to access the specific members of a structure variable.
Arrow Operator (−>)
The operator used to access a structure member when using a pointer to the structure, such as in the expression r−>length=10.
Union
A data type where all members occupy the same area of memory, meaning only one member can be meaningfully used at a time.
Structure Memory Allocation
Unlike unions, each member of a structure has its own distinct memory location.
Structure Declaration Syntax Requirement
A semicolon must follow the closing brace of a structure or union declaration.
Structure Initialization
The process of assigning values to members at the time of definition using an initialization list enclosed in braces, e.g., CarhotRod={"Ford","Mustang",1968,20000}.
Nested Structure
A structure that contains another structure as one of its members.
Enumerated Data Type (enum)
A user-defined data type consisting of named integer constants, such as enumPets{DOGS,CATS,BIRDS,HAMSTERS}.
Anonymous Union
A union that is declared without a tag.
Structure Member Initialization Rule
Structure members cannot be initialized in the structure definition itself; they must be initialized when a variable of that structure type is declared.