WBJECA 2025 Computer PYQ — What is the range of unsigned int in C?… | Mathem Solvex | Mathem Solvex
Tip:A–D to answerE for explanationV for videoS to reveal answer
WBJECA 2025 — Computer PYQ
WBJECA | Computer | 2025
What is the range of unsigned int in C?
Choose the correct answer:
A.
32,768 to + 32,767
B.
1 to +32,767
C.
0 to 65535
(Correct Answer)
D.
1 to 65536
Correct Answer:
0 to 65535
Explanation
Correct Option: (C) 0 to 65535
Explanation
In C programming, an unsigned int uses all available bits to represent positive values, effectively doubling the positive range compared to a signed integer.
Size Consideration: On most 16-bit systems (which this question assumes based on the options), an int occupies 2 bytes (16 bits).
Calculation: The number of values that can be represented by n bits is 2n. For 16 bits:
Total_Values=216=65,536
Range Definition: Since unsigned int starts from 0, the range is from 0 to 2n−1:
Range=0 to (65536−1)=0 to 65535
Explanation
Correct Option: (C) 0 to 65535
Explanation
In C programming, an unsigned int uses all available bits to represent positive values, effectively doubling the positive range compared to a signed integer.
Size Consideration: On most 16-bit systems (which this question assumes based on the options), an int occupies 2 bytes (16 bits).
Calculation: The number of values that can be represented by n bits is 2n. For 16 bits:
Total_Values=216=65,536
Range Definition: Since unsigned int starts from 0, the range is from 0 to 2n−1: