Why union is better than structure in C?

Advantages of Union Union takes less memory space as compared to the structure . Only the largest size data member can be directly accessed while using a union. It is used when you want to use less (same) memory for different data members.

Sizin İçin Seçtik  C structure nedir?

Leave a Reply

Your email address will not be published. Required fields are marked *

Why union is better than structure in C?

Advantages of Union Union takes less memory space as compared to the structure . Only the largest size data member can be directly accessed while using a union. It is used when you want to use less (same) memory for different data members.

Sizin İçin Seçtik  How big is the 5G buffer around airports?

Leave a Reply

Your email address will not be published. Required fields are marked *