A union variable can be initialized , provided its storage class is either external or static.
Only one member of a union can be assigned a value at any one time.
The initialization value is assigned to the first member within the union.
An example program to demonstrate initialization of union variables:
Only one member of a union can be assigned a value at any one time.
The initialization value is assigned to the first member within the union.
An example program to demonstrate initialization of union variables:

If you enjoyed this post, make sure you subscribe to my RSS feed!
Post a Comment