Join Dan Gookin for an in-depth discussion in this video Understanding structures, part of Learning C (2014).
- Another variable type in the C language…is the structure.…It's actually a combination of existing variable types…all tied together into a single unit.…A structure variable simply has many parts,…like a record in a database.…This movie presents the concept of the structure.…You'll see how to set up a structure,…create structure variables,…and how to access structure members.…I'll demonstrate how to fill data into a structure,…as well as the interesting idea…of placing one structure inside another.…
This isn't complete code of course,…but it shows you how a structure can…be created in the C language.…The key word struct is followed by the name…of the structure.…In this case the name is record.…The structure members are contained in curly brackets.…Each ending with a semicolon,…because the whole deal is a statement.…The structure members are variable declarations.…Inside this structure you'll find an int and a float member.…
The int member is named account,…the float member is named balance.…By itself the structure declaration merely…
- Understanding a C program
- Adding comments
- Using escape characters
- Working with values and placeholders
- Introducing variables
- Making a decision with if
- Adding functions
- Manipulating strings
- Building arrays
- Nesting structures
Skill Level Beginner
1. Getting Started
2. Programming Basics
3. Program Flow Control
4. Intermediate C Language Concepts
5. Advanced C Language Concepts
Next steps2m 11s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.