1/14
Flashcards reviewing C types, structs, and unions.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Data Type
An abstraction that allows a programmer to treat different memory ranges as different classes of data.
Strongly vs. Weakly Typed Languages
Programming languages are classified along a spectrum based on how they handle ambiguity in types and usage.
Strongly Typed Language
A language that won't compile if variables of a different type are passed as parameters or compared without explicit conversion.
Weakly Typed Language
A language that attempts to convert values to the correct type when variables of different types are used together.
Static Typing
Type of data is decided at compile time, and type conversion occurs at that time.
Dynamic Typing
Run-time environment dynamically applies types to variables as needed.
Type Casting
Explicitly annotating a type conversion.
Typedef
A way of extending the C type system to declare new types for the compiler to recognize and use. Creates an alias for another type.
Structure (Struct)
An organized unit of data that is treated as a single entity (variable)
Enumerated Type (Enum)
Allows you to associate integer values with names.
Union
A way to overlay different data structures over the same memory region, allowing you to selectively interpret the data in place.
-> Operator
Used to access the fields of a struct when handling a pointer to the struct.
Conditional Operator
Short-hand way of expressing an if-else statement.
Padding
Unused memory added by the compiler to a structure in order to ensure proper alignment of data members, which may be required by the underlying processor architecture.
Bit fields
Create numeric (integer) values that have a very specific width (in bits)