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.

Sizin İçin Seçtik  What is the difference between typedef and struct?

Leave a Reply

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