Live briefing
Everything about Struct (C programming language)
C keyword for defining a structured data type
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 it 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. Wikipedia →
đź§ Start here: a 6-step reading path
- Read the overview: Struct (C programming language)A 5-minute orientation
- Pick up a classic book: C++ ProgrammingThe most-reprinted book on the subject
- Read the landmark paper: C Programming: Structured Programming LanguageCited 0 times
- Go sideways: C data typesA closely related topic
- Go sideways: Union typeA closely related topic
đź“– Definitions
No dictionary entry for this exact phrase.
🗂️ The subject at a glance
🏆 Landmark papers (most cited)
📚 Books worth reading
C++ ProgrammingD. S. Malik · 2004
HackingJon Erickson, Jon Erickson · 2003
Programming C#Jesse Liberty · 2001
The C# programming languageAnders Hejlsberg, Scott Wiltamuth · 2004
C++ for programmersPaul J. Deitel, Harvey M. Deitel · 2009
SystemVerilog for VerificationChris Spear · 2006
Data structures, algorithms, and applications in C++Sartaj Sahni · 1998
Struct Programm into Ansi C PbCarter C, Chris Carter · 1991
Ranked by number of editions on Open Library, a rough measure of how lasting a book is.
đź”— Related topics
- C data types In the C programming language, data types constitute the semantics and characteristics of storage of data elements. They are expressed in the language…
- Union type In computer science, a union is a value that may have any of multiple representations or formats within the same area of memory, or a variable that may…
- C syntax C syntax is the form that text must have in order to be C programming language code. The language syntax rules are designed to allow for code that is terse…
- Typedef typedef is a reserved keyword in the programming languages C, C++, and Objective-C. It is used to create an additional name (alias) for another data type…
- Sizeof sizeof is a unary operator in the C and C++ programming languages that evaluates to the storage size of an expression or a data type, measured in units…
- Uninitialized variable In computing, an uninitialized variable is a variable that is declared but is not set to a definite known value before it is used. It will have some value…
- C++ classes A class in C++ is a user-defined type or data structure declared with any of the keywords class, struct or union (the first two are collectively referred…
- Pointer (computer programming) I do consider assignment statements and pointer variables to be among computer science's "most valuable treasures." — Donald Knuth, Structured Programming…