Their members can be objects of any type, including other structures and unions or arrays. A member can also consist of a bit field.
The only operators valid for use with entire structures and unions are the simple assignment (=) and sizeof operators. In particular, structures and unions cannot appear as operands of the equality ( == ), inequality (!=), or cast operators. The two structures or unions in the assignment must have the same members and member types.
A structure or a union can be passed by value to functions and returned by value by functions. The argument must have the same type as the function parameter. A structure or union is passed by value just like a scalar variable; that is, the entire structure or union is copied into the corresponding parameter.
similarity is all three are user defined data types.
Related Answers:
compare to struct union is to share the memory
union share the memory
similarity between structure and union :
Their members can be objects of any type, including other structures and unions or arrays. A member can also consist of a bit field.
The only operators valid for use with entire structures and unions are the simple assignment (=) and sizeof operators. In particular, structures and unions cannot appear as operands of the equality ( == ), inequality (!=), or cast operators. The two structures or unions in the assignment must have the same members and member types.
A structure or a union can be passed by value to functions and returned by value by functions. The argument must have the same type as the function parameter. A structure or union is passed by value just like a scalar variable; that is, the entire structure or union is copied into the corresponding parameter.
similarity is all three are user defined data types.
Related Answers:
Both share the memory