What is the range of the char type?

A)

0 to 215-1

 


B)

0 to 216-1

 


C)

0 to 215

 


D)

0 to 216

 


Showing Answers 1 - 7 of 7 Answers

kancherla sagar

  • Dec 13th, 2005
 

the answer is B.

the range of char is 1 Byte.

i.e 16 bits.

so the range will be 0 to 2^16-1

  Was this answer useful?  Yes

masarrat

  • Jul 24th, 2006
 

ans is 2 to the power 16 which is 65535 because char does not use msb as a sign bit. its uses all 16 bits for storing values

  Was this answer useful?  Yes

Ramesh

  • Dec 19th, 2006
 

0 to 215-1

  Was this answer useful?  Yes

abhishek79

  • Mar 14th, 2007
 




the range of char is 0 to 2^16 -1
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/datatypes.html) char range is 65535 that is equivalent to 2^16 -1 so answer B is right

  Was this answer useful?  Yes

jansi

  • Feb 28th, 2012
 

0 to 2^15-1

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions