C++ Chapter 11 Review: Structures and Unions

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/13

flashcard set

Earn XP

Description and Tags

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'.

Last updated 5:29 AM on 5/18/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

14 Terms

1
New cards

Built-in Data Type

A data type that is integrated directly into the C++ language, such as int, char, or float.

2
New cards

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.

3
New cards

Structure Tag

The identifier used in a structure declaration to name the new data type.

4
New cards

Members

The individual data elements or variables contained within a structure or union.

5
New cards

Dot Operator

The operator used to access the specific members of a structure variable.

6
New cards

Arrow Operator (>->)

The operator used to access a structure member when using a pointer to the structure, such as in the expression r>length=10r->length = 10.

7
New cards

Union

A data type where all members occupy the same area of memory, meaning only one member can be meaningfully used at a time.

8
New cards

Structure Memory Allocation

Unlike unions, each member of a structure has its own distinct memory location.

9
New cards

Structure Declaration Syntax Requirement

A semicolon must follow the closing brace of a structure or union declaration.

10
New cards

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}Car\,hotRod = \{"Ford", "Mustang", 1968, 20000\}.

11
New cards

Nested Structure

A structure that contains another structure as one of its members.

12
New cards

Enumerated Data Type (enum)

A user-defined data type consisting of named integer constants, such as enumPets{DOGS,CATS,BIRDS,HAMSTERS}enum\,Pets\,\{DOGS, CATS, BIRDS, HAMSTERS\}.

13
New cards

Anonymous Union

A union that is declared without a tag.

14
New cards

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.