98-372 · Question #40
You are creating an application using .NET Framework 4.0. The application uses an instance of the short type. Which of the following values can be stored in the instance of the short type? Each correc
The correct answer is D. -12 F. 16,633. The short type can only store values between -32,768 and 32,767. The short (Signed 16-bit integer) keyword indicates an integral data type that stores values according to the size and You can declare and initialize a short variable as follows: short x = 32767; In the above declar
Question
You are creating an application using .NET Framework 4.0. The application uses an instance of the short type. Which of the following values can be stored in the instance of the short type? Each correct answer represents a complete solution. Choose all that apply.
Options
- A-34,210
- B34,210
- C65,535
- D-12
- E127,236
- F16,633
How the community answered
(32 responses)- B3% (1)
- C3% (1)
- D81% (26)
- E13% (4)
Explanation
The short type can only store values between -32,768 and 32,767. The short (Signed 16-bit integer) keyword indicates an integral data type that stores values according to the size and You can declare and initialize a short variable as follows: short x = 32767; In the above declaration, the integer literal 32767 is implicitly converted from int to short. If the integer literal does not fit into a short storage location, a compilation error will arise.
Topics
Community Discussion
No community discussion yet for this question.