181k views
5 votes
A structure that specifies which of a number of permitted data types (e.g. integers) that may be stored in its instances is:

A. an array

B. a linked list

C. a bitmap

D. a union

2 Answers

2 votes

Answer:

D. A union

Step-by-step explanation:

User Vinzcent
by
8.2k points
3 votes

A union is a data type that allows you to define that different data types take up the same space (e.g., an int and a float).

Usually this is not a very safe way of programming, but there can be specific reasons to do it.

- edit: I deliberately give the definition of a union here, because the question can be interpreted in multiple ways. So I see how you could interpret the question as the definition of a linked list as well.


User LisaJ
by
7.3k points