Great job learning about structures! We’ve covered many important topics:

  • Structures allow you to create user-defined data types
  • Structures can package together other data types into one type
  • You can define a structure using the struct keyword
  • When defining a structure, the member variables are declared but not instantiated
  • Structures help programs work with complex data and can represent real-world objects
  • You can access member variables with the dot operator
  • You can have a pointer to a structure and access its member variables using the arrow operator
  • You can pass structures and structure pointers to functions
  • You can return structures from functions

With our understanding of structures, we can now create and work with complicated data types easily and efficiently.



Use the code in the workspace to play around with structures.

What can you add to the Person structure? What are some functions that would help act on the structure?

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?