A

Admin • 833K Points
Coach

Q. What is the range of a signed char variable in C?

  • (A) 0 to 255
  • (B) -128 to 127
  • (C) 0 to 127
  • (D) -128 to 255
  • Correct Answer - Option(B)
  • Views: 34
  • Filed under category C Programming
  • Hashtags:

Explanation by: Admin

In C, the range of a signed char variable depends on its storage size, which is 1 byte (8 bits).

  • The most significant bit (MSB) is used for the sign (0 for positive, 1 for negative).
  • The remaining 7 bits store the value.

Correct Answer:

(B) -128 to 127

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.