Which of the following statements about unions is false?

A. All union elements can be initialized when the union is defined.
B. Elements in a union occupy the same memory addresses.
C. The elements in a union are referenced using the direct selection operator.
D. Structures can contain unions.
E. When a union is defined, C reserves enough room to store the largest data object in the union.


Answer: A

Computer Science & Information Technology

You might also like to view...

In a catch statement, what does the following code do?

System.out.println(e.getMessage()); a. It prints the code that caused the exception. b. It prints the stack trace. c. It prints the error message for an exception. d. It overrides the toString method.

Computer Science & Information Technology

A(n) _________________ can display text and accept text input from the user.

What will be an ideal response?

Computer Science & Information Technology

Modify the program of Exercise 16.30 to count the number of guesses the player makes. If the number is 10 or fewer, dis- play Either you know the secret or you got lucky! If the player guesses the number in 10 tries, display Ahah! You know the secret! If the player makes more than 10 guesses, display You should be able to do better! Why should it take no more than 10 guesses? Well with each “good guess” the player should be able to eliminate half of the numbers. Now show why any number 1 to 1000 can be guessed in 10 or fewer tries.

What will be an ideal response?

Computer Science & Information Technology

What does a blue wavy line mean if it appears in your document?

a. A blue wavy line is the same as a red wavy line but in a different color theme. b. A wavy blue line means there may be a common usage error. c. A blue wavy line is the same as a green wavy line but in a different color theme. d. A blue wavy line means there is a spelling error.

Computer Science & Information Technology