What is union and enum in C++?

That is the main difference between structure union and enum in C. … Structure and union are two methods to store multiple variables of different types as a single variable . On the other hand, enum is a data type to declare a set of named constants. All these are user-defined data types.

Read more