GeekInterview.com
Series: Subject: Topic:
Question: 613 of 995

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


Asked by: Interview Candidate | Asked on: Dec 10th, 2005
Showing Answers 1 - 7 of 7 Answers
kancherla sagar

Answered On : 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

  
Login to rate this answer.
masarrat

Answered On : Jul 24th, 2006

View all answers by masarrat

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

  
Login to rate this answer.
Ramesh

Answered On : Dec 19th, 2006

0 to 215-1

  
Login to rate this answer.
abhishek79

Answered On : Mar 14th, 2007

View all answers by abhishek79

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

  
Login to rate this answer.
abhishek79

Answered On : Mar 14th, 2007

View all answers by abhishek79

sorry answer d is correct

  
Login to rate this answer.
abhishek79

Answered On : Mar 14th, 2007

View all answers by abhishek79




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

  
Login to rate this answer.
jansi

Answered On : Feb 28th, 2012

0 to 2^15-1

  
Login to rate this answer.

Give your answer:

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

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Ads

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.