Struct (C programming language) in the context of Identifier (computer languages)


Struct (C programming language) in the context of Identifier (computer languages)

Struct (C programming language) Study page number 1 of 1

Play TriviaQuestions Online!

or

Skip to study material about Struct (C programming language) in the context of "Identifier (computer languages)"


⭐ Core Definition: Struct (C programming language)

In the C programming language, struct is the keyword used to define a composite, a.k.a. record, data type – a named set of values that occupy a block of memory. It allows for the different values to be accessed via a single identifier, often a pointer. A struct can contain other data types so is used for mixed-data-type records. For example, a bank customer struct might contain fields for the customer's name, address, telephone number, and balance.

A struct occupies a contiguous block of memory, usually delimited (sized) by word-length boundaries. It corresponds to the similarly named feature available in some assemblers for Intel processors. Being a block of contiguous memory, each field within a struct is located at a certain fixed offset from the start.

↓ Menu
HINT:

In this Dossier

Struct (C programming language) in the context of Record (computer science)

In computer science, a record (also called a structure, struct, user-defined type (UDT), or compound data type) is a composite data structure – a collection of fields, possibly of different data types, typically fixed in number and sequence.

For example, a date could be stored as a record containing a numeric year field, a month field represented as a string, and a numeric day-of-month field. A circle record might contain a numeric radius and a center that is a point record containing x and y coordinates.

View the full Wikipedia page for Record (computer science)
↑ Return to Menu

Struct (C programming language) in the context of Compound data type

In computer science, a composite data type or compound data type is a data type that consists of programming language scalar data types and other composite types that may be heterogeneous and hierarchical in nature. It is sometimes called a structure or a record or by a language-specific keyword used to define one such as struct. It falls into the aggregate type classification which includes homogenous collections such as the array and list.

View the full Wikipedia page for Compound data type
↑ Return to Menu