Structures cannot contain arrays
Structures cannot contain other structures
Structures can have members of different data types
Structures are the same as arrays
- (Minus)
<- (Left Arrow)
. (Dot)
Both <- and .
Another structure
Function
Array
None of the mentioned
The size of the largest member
The sum of the sizes of all members
Twice the size of the largest member
Size of the smallest member
A structure can store multiple data types, a union cannot
A union can store multiple data types, a structure cannot
In a structure, only one member can be accessed at a time
In a union, only one member can be accessed at a time
struct {int a;}
struct a_struct {int a;}
struct a_struct int a;
struct a_struct {int a;};
Nested structure
Recursive structure
Union structure
Inline structure
b->var;
b.var;
b-var;
b>var;
struct stu;
struct Student stu;
stu;
int stu
Variables of the same type
Variables of the different type
Functions and variables
Only functions