Similar to a structure, a union also consists of data members but only one data is active at a time.
|
|
sizeof() a union is equal to the number of bytes occupied in RAM by the largest data member in the union.
|
The size of this union equal 20bytes because the largest data member sname occupies 20bytes in RAM.
enum represents the enumeration data type which is used to instruct the compiler to associate with the specific list of values for a variables.
|
It's a special area where you can find special questions and answers for CSE students or IT professionals. Also, In this section, we try to explain a topic in a very deep way.