TLDR Web Dev · ARTICLES & TUTORIALS

STRUCTURES IN C: FROM BASICS TO MEMORY ALIGNMENT

abstractexpr.com23 min read

Summary from the TLDR Web Dev newsletter

Structures, or structs, allow us to combine several variables to create a new data type. Some other languages support the same concept but call it “records”. If you come from object-oriented programming, you can think about them as classes without methods. C and C++ are commonly used for backend infrastructure in supporting web services, where structs are a valuable tool. This article is a deep dive on structs, starting with the basics and going deep into their attributes, memory management, and more.