What is union and structure in C++?

A union is like a struct in that it generally has several fields, all of which are public by default. Unlike a struct, however, only one of the fields is used at any given time. In other words, it is a structure that allows the same storage space to be used to store values of different data types at different times.

Sizin İçin Seçtik  What is the union of a C?

Leave a Reply

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

What is union and structure in C?

Union. 1. Definition. Structure is the container defined in C to store data variables of different type and also supports for the user defined variables storage . On other hand Union is also similar kind of container in C which can also holds the different type of variables along with the user defined variables.

Sizin İçin Seçtik  Arazi yatırımı mantıklı mı?

Leave a Reply

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