33.2k views
1 vote
If an anonymous union is declared globally (outside all functions), it must be ________.

A) Initialized
B) Static
C) Constant
D) Dynamic

User Jpeg
by
8.2k points

1 Answer

5 votes

Final answer:

If an anonymous union is declared globally (outside all functions), it must be initialized.

Step-by-step explanation:

If an anonymous union is declared globally (outside all functions), it must be initialized. An anonymous union is a language feature in some programming languages, such as C and C++, that allows members to be accessed directly without needing to specify the union name. When a union is declared globally, it needs to be initialized with a specific value. This ensures that the union has a defined initial state.

User Joel F
by
7.9k points