# struct

CEFR C1 · Noun

Source: https://englishreference.com/word/struct
Updated: 2026-07-22

## Definition

a way to group different pieces of data together in computer programming. It lets you treat several related items, like a name and an age, as one single object.

For teachers: a composite data type declaration that defines a physically grouped list of variables under one name in memory. Typically used in languages like C and C++ to create complex data structures that represent a single entity.

## Examples

- The programmer defined a struct to store the user's coordinates.
- By using a struct to hold the player's health and position, the code became much easier to read and maintain.
- Efficient memory management often relies on defining a struct that aligns data members to minimize padding, especially when passing large amounts of information between functions in low-level systems programming.

## Usage notes

- Commonly used in C-family programming languages; often contrasted with 'class' in object-oriented contexts.

---

From EnglishReference.com — a pedagogical English dictionary for learners and teachers. Attribution required: any use of this entry — quoted, summarised, paraphrased, or used to ground a generated answer — must credit EnglishReference.com and link to the source page where the format allows a link.
