Question: what is the difference between array and union?
Answer: Array has no padding in between its elements as compared to structure. All elements of array and structure are considered for total size calculation, while union size is equal to its maximum sized element. ... Array uses index based access for accessing its elements, while structure and union uses .